diff options
author | Michael Chastain <mec@google.com> | 2001-03-18 21:35:58 +0000 |
---|---|---|
committer | Michael Chastain <mec@google.com> | 2001-03-18 21:35:58 +0000 |
commit | 559e75c07a4bd1d17dd4d7aa05774773ac0c03cc (patch) | |
tree | f3d8dd41df93fc7dbc8511e2f20cf6bc595da615 | |
parent | 64cbbfaefea283f88a18a419fa162a31e637182f (diff) | |
download | gdb-559e75c07a4bd1d17dd4d7aa05774773ac0c03cc.zip gdb-559e75c07a4bd1d17dd4d7aa05774773ac0c03cc.tar.gz gdb-559e75c07a4bd1d17dd4d7aa05774773ac0c03cc.tar.bz2 |
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.
-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) |