diff options
author | Joel Brobecker <brobecker@gnat.com> | 2013-05-23 06:39:42 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2013-05-23 06:39:42 +0000 |
commit | ce70887aa8d17bd4acf188f4ebade9cd2717acef (patch) | |
tree | 43db7474d80c3287bc263d59ddbef7a1e219731b /gdb/mi | |
parent | 0201faace78ad7fb4eb26e405a95e62db267543e (diff) | |
download | binutils-gdb-ce70887aa8d17bd4acf188f4ebade9cd2717acef.tar.gz |
mi/mi-cmd-break.c: Use xsnprintf instead of sprintf (ARI fix)
gdb/ChangeLog:
* mi/mi-cmd-break.c (mi_argv_to_format): Use xsnprintf instead
of sprintf.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-break.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index 050cf3f3c02..87ccee743f8 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -135,7 +135,8 @@ mi_argv_to_format (char **argv, int argc) { char tmp[5]; - sprintf (tmp, "\\%o", (unsigned char) argv[0][i]); + xsnprintf (tmp, sizeof (tmp), "\\%o", + (unsigned char) argv[0][i]); obstack_grow (&obstack, tmp, strlen (tmp)); } break; |