php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51761
Patch scanner_ipr.diff revision 2010-05-06 22:13 UTC by russell dot tempero at rightnow dot com

Patch scanner_ipr.diff for Scripting Engine problem Bug #51761

Patch version 2010-05-06 22:13 UTC

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

Developer: russell.tempero@rightnow.com

Index: Zend/zend_language_scanner.c
===================================================================
RCS file: /nfs/users/apiutil/rtempero/local/repositories/cvsroot/php-5.3.2/Zend/zend_language_scanner.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 zend_language_scanner.c
--- Zend/zend_language_scanner.c	14 Apr 2010 23:17:31 -0000	1.1.1.1
+++ Zend/zend_language_scanner.c	5 May 2010 01:26:17 -0000
@@ -26,7 +26,7 @@
 /* $Id: zend_language_scanner.c,v 1.1.1.1 2010/04/14 23:17:31 rtempero Exp $ */
 
 #if 0
-# define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c)
+# define YYDEBUG(s, c) fprintf(stderr, "RUSSELL: state: %d char: %c addr: %#x\n", s, c, &(c))
 #else
 # define YYDEBUG(s, c)
 #endif
@@ -3171,7 +3171,15 @@ yy202:
 #line 3172 "Zend/zend_language_scanner.c"
 yy203:
 		YYDEBUG(203, *YYCURSOR);
-		yych = *++YYCURSOR;
+		YYCURSOR++;
+		if (YYCURSOR >= YYLIMIT) {
+			yyleng = YYCURSOR - SCNG(yy_text);
+			zendlval->value.str.val = yytext; /* no copying - intentional */
+			zendlval->value.str.len = yyleng;
+			zendlval->type = IS_STRING;
+			return 0;
+		}
+		yych = *YYCURSOR;
 		goto yy202;
 yy204:
 		YYDEBUG(204, *YYCURSOR);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC