diff options
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2416,6 +2416,10 @@ read_escape() int numlen; c = scan_hex(lex_p, 2, &numlen); + if (numlen == 0) { + yyerror("Invalid escape character syntax"); + return 0; + } lex_p += numlen; } return c; @@ -2501,6 +2505,10 @@ tokadd_escape(term) tokadd('\\'); tokadd(c); scan_hex(lex_p, 2, &numlen); + if (numlen == 0) { + yyerror("Invalid escape character syntax"); + return -1; + } while (numlen--) tokadd(nextc()); } |