aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-02 22:56:44 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-02 22:56:44 +0000
commitdaac021a6ce0a672d67ff5d289851befbf0b9689 (patch)
treefa87d859319ca5ac46178e27c9764300551d4222 /gdb/printcmd.c
parentc38d16a719b158f15ebd7b99d60cfbf2e8c7b8b7 (diff)
downloadgdb-daac021a6ce0a672d67ff5d289851befbf0b9689.zip
gdb-daac021a6ce0a672d67ff5d289851befbf0b9689.tar.gz
gdb-daac021a6ce0a672d67ff5d289851befbf0b9689.tar.bz2
2011-03-02 Michael Snyder <msnyder@vmware.com>
* printcmd.c (print_scalar_formatted): Use strncpy for safety.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index e78acb3..12249a0 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -533,7 +533,7 @@ print_scalar_formatted (const void *valaddr, struct type *type,
if (*cp == '\0')
cp--;
}
- strcpy (buf, cp);
+ strncpy (buf, cp, sizeof (bits));
fputs_filtered (buf, stream);
}
break;