summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2021-01-11 13:08:29 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2021-01-11 13:21:12 +0100
commit25103c37aa6d7b2da506e35e675177993c200268 (patch)
tree41462d998403d374fbfff7b4bff75932ae50de7d /sapi
parent9450893dc682fa09ea1265acd2d885710ca82699 (diff)
downloadphp-git-25103c37aa6d7b2da506e35e675177993c200268.tar.gz
Revert "Fix #76813: Access violation near NULL on source operand"
This reverts commit 5e15c9c41f8318a8392c2e2c78544f218736549c, since re2c default rules are only available as of re2c 0.13.7.
Diffstat (limited to 'sapi')
-rw-r--r--sapi/phpdbg/phpdbg_lexer.l6
-rw-r--r--sapi/phpdbg/phpdbg_parser.y8
-rw-r--r--sapi/phpdbg/tests/bug76813.phpt10
3 files changed, 3 insertions, 21 deletions
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l
index e57702ba0b..422cda4f2c 100644
--- a/sapi/phpdbg/phpdbg_lexer.l
+++ b/sapi/phpdbg/phpdbg_lexer.l
@@ -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);
diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y
index 4c4a339c0a..3031ce5a80 100644
--- a/sapi/phpdbg/phpdbg_parser.y
+++ b/sapi/phpdbg/phpdbg_parser.y
@@ -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
diff --git a/sapi/phpdbg/tests/bug76813.phpt b/sapi/phpdbg/tests/bug76813.phpt
deleted file mode 100644
index 61e5e3fea6..0000000000
--- a/sapi/phpdbg/tests/bug76813.phpt
+++ /dev/null
@@ -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>