php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65091
Patch fix_scanner_overread revision 2013-06-24 15:45 UTC by keithk at powderkeginteractive dot com

Patch fix_scanner_overread for Scripting Engine problem Bug #65091

Patch version 2013-06-24 15:45 UTC

Return to Bug #65091 | Download this patch
Patch Revisions:

Developer: keithk@powderkeginteractive.com

---
 Zend/zend_language_scanner.l | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index d2e7243..de66cef 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -1805,7 +1805,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
 }
 
 <INITIAL>{ANY_CHAR} {
-	if (YYCURSOR > YYLIMIT) {
+	if (YYCURSOR >= YYLIMIT) {
 		return 0;
 	}
 
@@ -2213,7 +2213,7 @@ inline_html:
 		goto double_quotes_scan_done;
 	}
 
-	if (YYCURSOR > YYLIMIT) {
+	if (YYCURSOR >= YYLIMIT) {
 		return 0;
 	}
 	if (yytext[0] == '\\' && YYCURSOR < YYLIMIT) {
@@ -2256,7 +2256,7 @@ double_quotes_scan_done:
 
 
 <ST_BACKQUOTE>{ANY_CHAR} {
-	if (YYCURSOR > YYLIMIT) {
+	if (YYCURSOR >= YYLIMIT) {
 		return 0;
 	}
 	if (yytext[0] == '\\' && YYCURSOR < YYLIMIT) {
@@ -2302,7 +2302,7 @@ double_quotes_scan_done:
 
 	zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
 
-	if (YYCURSOR > YYLIMIT) {
+	if (YYCURSOR >= YYLIMIT) {
 		return 0;
 	}
 
@@ -2376,7 +2376,7 @@ heredoc_scan_done:
 
 	zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
 
-	if (YYCURSOR > YYLIMIT) {
+	if (YYCURSOR >= YYLIMIT) {
 		return 0;
 	}
 
@@ -2430,7 +2430,7 @@ nowdoc_scan_done:
 
 
 <ST_IN_SCRIPTING,ST_VAR_OFFSET>{ANY_CHAR} {
-	if (YYCURSOR > YYLIMIT) {
+	if (YYCURSOR >= YYLIMIT) {
 		return 0;
 	}
 
-- 

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Sep 22 18:03:35 2021 UTC