projects
/
platform
/
upstream
/
binutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39da812
)
* printcmd.c (printf_command): Guard against 0-length string.
author
Michael Snyder
<msnyder@vmware.com>
Mon, 24 Jul 2000 18:13:27 +0000
(18:13 +0000)
committer
Michael Snyder
<msnyder@vmware.com>
Mon, 24 Jul 2000 18:13:27 +0000
(18:13 +0000)
----------------------------------------------------------------------
gdb/printcmd.c
patch
|
blob
|
history
diff --git
a/gdb/printcmd.c
b/gdb/printcmd.c
index 629af99dc45661f8fbd73c5ec561dbfa15e368d1..45baef2ba64931697af479d6a69dc3504f96067f 100644
(file)
--- a/
gdb/printcmd.c
+++ b/
gdb/printcmd.c
@@
-2331,7
+2331,8
@@
printf_command (arg, from_tty)
/* Copy the string contents into a string inside GDB. */
str = (char *) alloca (j + 1);
- read_memory (tem, str, j);
+ if (j != 0)
+ read_memory (tem, str, j);
str[j] = 0;
printf_filtered (current_substring, str);