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;
}