aboutsummaryrefslogtreecommitdiff
path: root/gdb/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/charset.c')
-rw-r--r--gdb/charset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/charset.c b/gdb/charset.c
index 89baf46..777d901 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -531,7 +531,7 @@ convert_between_encodings (const char *from, const char *to,
{
char octal[5];
- sprintf (octal, "\\%.3o", *inp & 0xff);
+ xsnprintf (octal, sizeof (octal), "\\%.3o", *inp & 0xff);
obstack_grow_str (output, octal);
++inp;