This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] gdb/win32-nat.c: check for NULL before calling strtoul
- To: gdb-patches at sources dot redhat dot com
- Subject: Re: [RFA] gdb/win32-nat.c: check for NULL before calling strtoul
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Sun, 18 Mar 2001 14:11:34 -0500
- References: <200103180752.XAA02531@bosch.cygnus.com>
On Sat, Mar 17, 2001 at 11:52:23PM -0800, Michael Elizabeth Chastain wrote:
>This patch fixes PR gdb/43, a coding error in child_attach. Cygwin's
>implementation of strtoul dumps core if the input pointer is NULL.
>This means gdb dumps core on a plain "attach" command with no arguments.
>
>This fix enables the test script gdb.base/default.exp to run to
>completion.
>
>I tested this on Windows 2000 Professional + cygwin 1.1.8. I gave a
>plain "attach" command by hand and also ran gdb.base/default.exp.
>
>OK to apply?
Yes.
Thanks,
cgf
>2001-03-17 Michael Chastain <chastain@redhat.com>
>
> * win32-nat.c (child_attach): check args for NULL before passing
> to strtoul. This fixes PR gdb/43.