From dc4d68869c3c700b629bd9f12076bd7fbd35aa49 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Sat, 13 Dec 2014 14:04:05 -0800 Subject: utils.c (make_hex_string): Fix off-by-one error. gdb/ChangeLog: * utils.c (make_hex_string): Fix off-by-one error. --- gdb/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/utils.c') diff --git a/gdb/utils.c b/gdb/utils.c index ea2b18a..47adb67 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1124,7 +1124,7 @@ make_hex_string (const gdb_byte *data, size_t length) p = result; for (i = 0; i < length; ++i) - p += xsnprintf (p, 2, "%02x", data[i]); + p += xsnprintf (p, 3, "%02x", data[i]); *p = '\0'; return result; } -- cgit v1.1