diff options
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index c36979c9..5874077c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -31,6 +31,7 @@ const char *get_value_string(const struct value_string *vs, uint32_t val) } snprintf(namebuf, sizeof(namebuf), "unknown 0x%x", val); + namebuf[sizeof(namebuf) - 1] = '\0'; return namebuf; } |