Add safeguard to prevent charmap symbol length overflowing

This commit is contained in:
Andrey A. Chernov 2001-11-27 23:39:14 +00:00
parent 414f6d3373
commit d262b81bdb

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