summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/remote_gdb.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/remote_gdb.cc b/base/remote_gdb.cc
index 3685b05d1..17331fcd9 100644
--- a/base/remote_gdb.cc
+++ b/base/remote_gdb.cc
@@ -834,7 +834,7 @@ RemoteGDB::trap(int type)
active = true;
else
// Tell remote host that an exception has occurred.
- sprintf((char *)buffer, "S%02x", signal(type));
+ snprintf((char *)buffer, sizeof(buffer), "S%02x", signal(type));
send(buffer);
// Stick frame regs into our reg cache.
@@ -852,7 +852,7 @@ RemoteGDB::trap(int type)
// if this command came from a running gdb, answer it --
// the other guy has no way of knowing if we're in or out
// of this loop when he issues a "remote-signal".
- sprintf((char *)buffer, "S%02x", signal(type));
+ snprintf((char *)buffer, sizeof(buffer), "S%02x", signal(type));
send(buffer);
continue;