From: Michael Chastain Date: Sun, 18 Mar 2001 21:35:58 +0000 (+0000) Subject: 2001-03-17 Michael Chastain X-Git-Tag: dberlin-typesystem-branchpoint~1010 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=559e75c07a4bd1d17dd4d7aa05774773ac0c03cc;p=thirdparty%2Fbinutils-gdb.git 2001-03-17 Michael Chastain * win32-nat.c (child_attach): check args for NULL before passing to strtoul. This fixes PR gdb/43. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 10cea66e71e..76cf356669d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-03-17 Michael Chastain + + * win32-nat.c (child_attach): check args for NULL before passing + to strtoul. This fixes PR gdb/43. + 2001-03-17 Mark Kettenis * i387-nat.h: Doc Fix. diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index f0d97fa6f26..277b473456b 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -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) diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index f0d97fa6f26..277b473456b 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -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)