aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/python/py-finishbreakpoint.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4656b24..db08427 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2011-12-27 Joel Brobecker <brobecker@adacore.com>
+ * py-finishbreakpoint.c (bpfinishpy_init): Replace call to
+ sprintf by call to xsnprintf.
+
+2011-12-27 Joel Brobecker <brobecker@adacore.com>
+
* linespec.c (struct collect_minsyms) [list_mode]: New field.
(add_minsym): Ignore data symbols if not in list mode.
(search_minsyms_for_name): Set local.list_mode.
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c
index a2d8165..c158d47 100644
--- a/gdb/python/py-finishbreakpoint.c
+++ b/gdb/python/py-finishbreakpoint.c
@@ -277,7 +277,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
{
/* Set a breakpoint on the return address. */
finish_pc = get_frame_pc (prev_frame);
- sprintf (small_buf, "*%s", hex_string (finish_pc));
+ xsnprintf (small_buf, sizeof (small_buf), "*%s", hex_string (finish_pc));
addr_str = small_buf;
create_breakpoint (python_gdbarch,