diff options
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/image.c b/common/image.c index 0e86c13..7604494 100644 --- a/common/image.c +++ b/common/image.c @@ -587,10 +587,12 @@ const table_entry_t *get_table_entry(const table_entry_t *table, int id) static const char *unknown_msg(enum ih_category category) { + static const char unknown_str[] = "Unknown "; static char msg[30]; - strcpy(msg, "Unknown "); - strcat(msg, table_info[category].desc); + strcpy(msg, unknown_str); + strncat(msg, table_info[category].desc, + sizeof(msg) - sizeof(unknown_str)); return msg; } |