diff options
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/monitor.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3241757..1ef2181 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +1998-12-03 Jason Molenda (jsm@bugshack.cygnus.com) + + * monitor.c (monitor_read_memory): Zero out pattern buffers + before calling re_search. + (parse_register_dump): Ditto. Thu Dec 3 10:37:22 EST 1998 Zdenek Radouch (radouch@cygnus.com) @@ -5,7 +10,6 @@ Thu Dec 3 10:37:22 EST 1998 Zdenek Radouch (radouch@cygnus.com) * configure.tgt * fr30-tdep.c * config/fr30/tm-fr30.h - Thu Dec 3 16:30:35 1998 Andrew Cagney <cagney@b1.cygnus.com> diff --git a/gdb/monitor.c b/gdb/monitor.c index 60cfc14..ddd24c2 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -847,6 +847,8 @@ parse_register_dump (buf, len) points to the start of the register value. */ struct re_registers register_strings; + memset (®ister_strings, 0, sizeof (struct re_registers)); + if (re_search (®ister_pattern, buf, len, 0, len, ®ister_strings) == -1) break; @@ -1759,6 +1761,7 @@ monitor_read_memory (memaddr, myaddr, len) struct re_registers resp_strings; RDEBUG(("MON getmem.resp_delim %s\n",current_monitor->getmem.resp_delim)) ; + memset (&resp_strings, 0, sizeof (struct re_registers)); tmp = strlen (p); retval = re_search (&getmem_resp_delim_pattern, p, tmp, 0, tmp, &resp_strings); |