cvs: php4 /ext/standard url_scanner_ex.c url_scanner_ex.re

From: Date: Thu, 19 Oct 2000 17:40:56 +0000
Subject: cvs: php4 /ext/standard url_scanner_ex.c url_scanner_ex.re
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2138@lists.php.net to get a copy of this message
sas Thu Oct 19 10:40:56 2000 EDT Modified files: /php4/ext/standard url_scanner_ex.c url_scanner_ex.re Log: Hack for #7262, not fixed yet Index: php4/ext/standard/url_scanner_ex.c diff -u php4/ext/standard/url_scanner_ex.c:1.19 php4/ext/standard/url_scanner_ex.c:1.20 --- php4/ext/standard/url_scanner_ex.c:1.19 Tue Oct 17 07:17:21 2000 +++ php4/ext/standard/url_scanner_ex.c Thu Oct 19 10:40:56 2000 @@ -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 @@ 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: php4/ext/standard/url_scanner_ex.re diff -u php4/ext/standard/url_scanner_ex.re:1.20 php4/ext/standard/url_scanner_ex.re:1.21 --- php4/ext/standard/url_scanner_ex.re:1.20 Tue Oct 17 07:17:21 2000 +++ php4/ext/standard/url_scanner_ex.re Thu Oct 19 10:40:56 2000 @@ -281,7 +281,10 @@ 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; }

« previous php.cvs (#2138) next »