Add safeguard to prevent charmap symbol length overflowing

This commit is contained in:
ache 2001-11-27 23:39:14 +00:00
parent d1f6a55d62
commit c5c274cf2c

View File

@ -80,6 +80,8 @@ statment :
| order
;
charmap : DEFN CHAR {
if (strlen($1) + 1 > CHARMAP_SYMBOL_LEN)
yyerror("Charmap symbol name '%s' is too long", $1);
strcpy(charmap_table[$2], $1);
}
;