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.
This commit is contained in:
Michael Chastain 2001-03-18 21:35:58 +00:00
parent 64cbbfaefe
commit 559e75c07a
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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.
2001-03-17 Mark Kettenis <kettenis@gnu.org>
* i387-nat.h: Doc Fix.

View File

@ -1015,11 +1015,12 @@ static void
child_attach (char *args, int from_tty)
{
BOOL ok;
DWORD pid = strtoul (args, 0, 0);
DWORD pid;
if (!args)
error_no_arg ("process-id to attach");
pid = strtoul (args, 0, 0);
ok = DebugActiveProcess (pid);
if (!ok)

View File

@ -1015,11 +1015,12 @@ static void
child_attach (char *args, int from_tty)
{
BOOL ok;
DWORD pid = strtoul (args, 0, 0);
DWORD pid;
if (!args)
error_no_arg ("process-id to attach");
pid = strtoul (args, 0, 0);
ok = DebugActiveProcess (pid);
if (!ok)