summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mi/mi-cmd-break.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9ca55d7f81f..1c21cd46689 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-23 Joel Brobecker <brobecker@adacore.com>
+
+ * mi/mi-cmd-break.c (mi_argv_to_format): Use xsnprintf instead
+ of sprintf.
+
2013-05-22 Keith Seitz <keiths@redhat.com>
* ada-lang.c (is_known_support_routine): Add explicit free of
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;