Revert "Fix #76813: Access violation near NULL on source operand"

This reverts commit 5e15c9c41f, since
re2c default rules are only available as of re2c 0.13.7.
This commit is contained in:
Christoph M. Becker 2021-01-11 13:08:29 +01:00
parent 9450893dc6
commit 25103c37aa
4 changed files with 3 additions and 24 deletions

3
NEWS
View File

@ -72,9 +72,6 @@ PHP NEWS
. Fixed bug #76815 (PDOStatement cannot be GCed/closeCursor-ed when a
PROCEDURE resultset SIGNAL). (Nikita)
- Phpdbg:
. Fixed bug #76813 (Access violation near NULL on source operand). (cmb)
- Standard:
. Fixed bug #77423 (FILTER_VALIDATE_URL accepts URLs with invalid userinfo).
(CVE-2020-7071) (cmb)

View File

@ -33,7 +33,7 @@ void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) {
YYSETCONDITION(INITIAL);
LEX(text) = YYCURSOR = YYMARKER = (unsigned char *) input;
LEX(text) = YYCURSOR = (unsigned char *) input;
LEX(len) = strlen(input);
}
@ -165,10 +165,6 @@ INPUT ("\\"[#"']|["]("\\\\"|"\\"["]|[^\n\000"])+["]|[']("\\"[']|"\\\\"|[^\
return T_ID;
}
<NORMAL>* {
return T_UNEXPECTED;
}
<RAW>{INPUT} {
phpdbg_init_param(yylval, STR_PARAM);
yylval->str = estrdup(yytext);

View File

@ -63,13 +63,9 @@ typedef void* yyscan_t;
%% /* Rules */
input
: non_empty_input { $$ = $1; }
| /* empty */
;
non_empty_input
: command { $$ = $1; }
| non_empty_input T_SEPARATOR command { phpdbg_stack_separate($1.top); $$ = $3; }
| input T_SEPARATOR command { phpdbg_stack_separate($1.top); $$ = $3; }
| /* empty */
;
command

View File

@ -1,10 +0,0 @@
--TEST--
Bug #76813 (Access_violation_near_NULL_on_source_operand)
--PHPDBG--
"#!==)===\377\377\276\242="
#!==)===\377\377\276\242=
--EXPECT--
prompt> [Parse Error: syntax error, unexpected input, expecting $end]
prompt> [Parse Error: syntax error, unexpected # (pound sign), expecting $end]
prompt> [Parse Error: syntax error, unexpected # (pound sign), expecting $end]
prompt>