diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/win32-nat.c | 3 | ||||
-rw-r--r-- | gdb/windows-nat.c | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 10cea66..76cf356 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index f0d97fa..277b473 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 f0d97fa..277b473 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) |