This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

null pointer dereferencing patch for MicroWindows/VNC


While playing around with MicroWindows/VNC I found and fixed two
instances of null pointer dereferencing.


Index: drivers/kbd_vnc_ecos.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/gfx/mw/current/src/drivers/kbd_vnc_ec
os.c,v
retrieving revision 1.1
diff -u -5 -b -r1.1 kbd_vnc_ecos.c
--- drivers/kbd_vnc_ecos.c 28 Aug 2003 10:34:35 -0000 1.1
+++ drivers/kbd_vnc_ecos.c 3 Sep 2003 11:45:38 -0000
@@ -111,10 +111,11 @@
{
*modifiers = MWKMOD_CTRL | MWKMOD_SHIFT | MWKMOD_ALT | MWKMOD_META
| MWKMOD_CAPS | MWKMOD_NUM | MWKMOD_SCR;
}


+    if (curmodifiers)
     *curmodifiers = current_mods;
 }


/*
Index: ecos/nanox_thread.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/gfx/mw/current/src/ecos/nanox_thread.
c,v
retrieving revision 1.2
diff -u -5 -b -r1.2 nanox_thread.c
--- ecos/nanox_thread.c 30 Aug 2003 21:30:05 -0000 1.2
+++ ecos/nanox_thread.c 3 Sep 2003 11:45:38 -0000
@@ -42,11 +42,12 @@
externC int nanox_main(int argc, char *argv[]);


 static void
 nanox_thread(CYG_ADDRWORD data)
 {
+    static char *prog_name = "nanox_thread";
     int argc = 0;
-    char **argv;
+    char *argv[] = { prog_name, NULL };

         printf("%s.%d\n", __FUNCTION__, __LINE__);
     nanox_main(argc, argv);
 }

--
--------------------------------------------------------------------
|     Eric Doenges              |     DynaPel Laboratories GmbH    |
|     Tel: +49 89 962428 23     |     Fraunhoferstrasse 9/2        |
|     Fax: +49 89 962428 90     |     D - 85737 Ismaning, Germany  |
--------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]