fixed bug, where a linebreak immediately after an opening quote of a value caused a segfault

This commit is contained in:
Christoph M. Becker 2015-06-04 02:40:05 +02:00 committed by Anatol Belski
parent 2ba9681e8e
commit 36222eb4cc

View File

@ -472,7 +472,7 @@ end_raw_value_chars:
} }
/* Eat leading and trailing double quotes */ /* Eat leading and trailing double quotes */
if (yytext[0] == '"' && yytext[yyleng - 1] == '"') { if (yyleng > 1 && yytext[0] == '"' && yytext[yyleng - 1] == '"') {
SCNG(yy_text)++; SCNG(yy_text)++;
yyleng = yyleng - 2; yyleng = yyleng - 2;
} else if (sc) { } else if (sc) {