2 parents f785614 + d92b5f9 commit 10f1d04Copy full SHA for 10f1d04
2 files changed
sapi/phpdbg/phpdbg_lexer.l
@@ -166,6 +166,13 @@ INPUT ("\\"[#"']|["]("\\\\"|"\\"["]|[^\n\000"])*["]|[']("\\"[']|"\\\\"|[^\
166
return T_ID;
167
}
168
169
+<NORMAL>["'] {
170
+ phpdbg_init_param(yylval, STR_PARAM);
171
+ yylval->str = estrndup(yytext, yyleng);
172
+ yylval->len = yyleng;
173
+ return T_ID;
174
+}
175
+
176
<RAW>{INPUT} {
177
phpdbg_init_param(yylval, STR_PARAM);
178
yylval->str = estrdup(yytext);
sapi/phpdbg/tests/gh17387.phpt
@@ -0,0 +1,8 @@
1
+--TEST--
2
+GH-17387 (Trivial crash in phpdbg lexer)
3
+--PHPDBG--
4
+a';
5
+q
6
+--EXPECT--
7
+prompt> [The command "a" could not be found]
8
+prompt>
0 commit comments