com php-src: Revert "Fix #76813: Access violation near NULL on source operand": NEWS sapi/phpdbg/phpdbg_lexer.l sapi/phpdbg/php dbg_parser.y
sapi/phpdbg/tests/bug76813.phpt
| From: | Derick Rethans | Date: | Tue, 15 Dec 2020 15:59:24 +0000 |
| Subject: | com php-src: Revert "Fix #76813: Access violation near NULL on source operand": NEWS sapi/phpdbg/phpdbg_lexer.l sapi/phpdbg/php dbg_parser.y sapi/phpdbg/tests/bug76813.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-114470@lists.php.net to get a copy of this message | ||
Commit: a668ce82de2987502268a10c2b867b66d24d0708
Author: Derick Rethans <github@derickrethans.nl> Tue, 15 Dec 2020 15:58:57 +0000
Parents: 1e5f414394cb6d4769097294582af4f059c22912
Branches: PHP-7.4.14
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a668ce82de2987502268a10c2b867b66d24d0708
Log:
Revert "Fix #76813: Access violation near NULL on source operand"
This reverts commit 5e15c9c41f8318a8392c2e2c78544f218736549c.
Bugs:
https://bugs.php.net/76813
Changed paths:
M NEWS
M sapi/phpdbg/phpdbg_lexer.l
M sapi/phpdbg/phpdbg_parser.y
D sapi/phpdbg/tests/bug76813.phpt
Diff:
diff --git a/NEWS b/NEWS
index 14fce8f5d5d..7276f14b155 100644
--- a/NEWS
+++ b/NEWS
@@ -49,9 +49,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 #80366 (Return Value of zend_fstat() not Checked). (sagpant, cmb)
. Fixed bug #80411 (References to null-serialized object break serialize()).
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l
index e57702ba0b1..422cda4f2c0 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 4c4a339c0ab..3031ce5a807 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 61e5e3fea63..00000000000
--- 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>