aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-05-23 06:39:42 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-05-23 06:39:42 +0000
commitce70887aa8d17bd4acf188f4ebade9cd2717acef (patch)
tree43db7474d80c3287bc263d59ddbef7a1e219731b /gdb/mi
parent0201faace78ad7fb4eb26e405a95e62db267543e (diff)
downloadgdb-ce70887aa8d17bd4acf188f4ebade9cd2717acef.zip
gdb-ce70887aa8d17bd4acf188f4ebade9cd2717acef.tar.gz
gdb-ce70887aa8d17bd4acf188f4ebade9cd2717acef.tar.bz2
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 050cf3f..87ccee7 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;