This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: null pointer dereferencing patch for MicroWindows/VNC
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Eric Doenges <Eric dot Doenges at DynaPel dot com>
- Cc: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 03 Sep 2003 06:07:06 -0600
- Subject: Re: null pointer dereferencing patch for MicroWindows/VNC
- Organization: MLB Associates
- References: <3F55D536.8080006@DynaPel.com>
On Wed, 2003-09-03 at 05:49, Eric Doenges wrote:
> While playing around with MicroWindows/VNC I found and fixed two
> instances of null pointer dereferencing.
>
These look reasonable - I'll apply them, thanks.
Next time, please send a ChangeLog entry as well (which would have
explained why they were necessary)
>
> 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);
> }
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates