diff options
author | Michael Snyder <msnyder@specifix.com> | 2011-03-02 22:56:44 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2011-03-02 22:56:44 +0000 |
commit | 027945ee45479b3a1df469981fe4c5d58bbb2ba0 (patch) | |
tree | 6961bf9db4ff3cce6d9f6b22d4660531dba2a6dc /gdb/printcmd.c | |
parent | 56f50d1a90674128b17d952c5580ec2acce7f77b (diff) | |
download | gdb-027945ee45479b3a1df469981fe4c5d58bbb2ba0.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index e78acb39a56..12249a004b0 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; |