]> granicus.if.org Git - php/commitdiff
Hack for #7262, not fixed yet
authorSascha Schumann <sas@php.net>
Thu, 19 Oct 2000 17:40:56 +0000 (17:40 +0000)
committerSascha Schumann <sas@php.net>
Thu, 19 Oct 2000 17:40:56 +0000 (17:40 +0000)
ext/standard/url_scanner_ex.c
ext/standard/url_scanner_ex.re

index 5e0adb9078675c35079feb038608f1e323078e7b..c89420e71a8d29de905ce9597447eac2211db594 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Tue Oct 17 16:16:42 2000 */
+/* Generated by re2c 0.5 on Thu Oct 19 19:46:51 2000 */
 #line 1 "/home/sas/src/php4/ext/standard/url_scanner_ex.re"
 /*
   +----------------------------------------------------------------------+
@@ -638,7 +638,10 @@ stop:
        scdebug(("stopped in state %d at pos %d (%d:%c)\n", STATE, YYCURSOR - ctx->buf.c, *YYCURSOR, *YYCURSOR));
 
        rest = YYLIMIT - start;
-               
+
+       /* XXX: Crash avoidance. Need to work with reporter to figure out what goes wrong */    
+       if (rest < 0) rest = 0;
+       
        if (rest) memmove(ctx->buf.c, start, rest);
        ctx->buf.len = rest;
 }
index 228917c5485df4e13aa45a29a368fe5acb93a932..b4a108d6d24d213420afe61160c7f3d3a6cba7c1 100644 (file)
@@ -281,7 +281,10 @@ stop:
        scdebug(("stopped in state %d at pos %d (%d:%c)\n", STATE, YYCURSOR - ctx->buf.c, *YYCURSOR, *YYCURSOR));
 
        rest = YYLIMIT - start;
-               
+
+       /* XXX: Crash avoidance. Need to work with reporter to figure out what goes wrong */    
+       if (rest < 0) rest = 0;
+       
        if (rest) memmove(ctx->buf.c, start, rest);
        ctx->buf.len = rest;
 }