aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-finishbreakpoint.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-12-27 04:12:10 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-12-27 04:12:10 +0000
commit41843fe8ff3cdc16b8c1448099f02cc19f362658 (patch)
treeb4e3bd5290f3e626e3bc634645139162f199f5b1 /gdb/python/py-finishbreakpoint.c
parent095bcf5ed385469a25e1f8eb0bd0d408a69c93a7 (diff)
downloadgdb-41843fe8ff3cdc16b8c1448099f02cc19f362658.zip
gdb-41843fe8ff3cdc16b8c1448099f02cc19f362658.tar.gz
gdb-41843fe8ff3cdc16b8c1448099f02cc19f362658.tar.bz2
remove use of sprintf in py-finishbreakpoint.c...
... and replace it with call to xsnprintf, following GDB's coding rules. gdb/ChangeLog: * py-finishbreakpoint.c (bpfinishpy_init): Replace call to sprintf by call to xsnprintf.
Diffstat (limited to 'gdb/python/py-finishbreakpoint.c')
-rw-r--r--gdb/python/py-finishbreakpoint.c2
1 files changed, 1 insertions, 1 deletions
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,