cvs: php4 /ext/standard reg.c

From: Date: Mon, 17 Jun 2002 15:10:22 +0000
Subject: cvs: php4 /ext/standard reg.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12387@lists.php.net to get a copy of this message
andrei Mon Jun 17 11:10:22 2002 EDT Modified files: /php4/ext/standard reg.c Log: Applied fix for #17764. @- Fixed a crash in ereg_replace() when backreference number was greater @ than the number of subpatterns. (oliver@billix.franken.de) Index: php4/ext/standard/reg.c diff -u php4/ext/standard/reg.c:1.62 php4/ext/standard/reg.c:1.63 --- php4/ext/standard/reg.c:1.62 Sat May 4 07:20:12 2002 +++ php4/ext/standard/reg.c Mon Jun 17 11:10:22 2002 @@ -17,7 +17,7 @@ | Jaakko Hyvätti <jaakko@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.62 2002/05/04 11:20:12 hirokawa Exp $ */ +/* $Id: reg.c,v 1.63 2002/06/17 15:10:22 andrei Exp $ */ #include <stdio.h> #include "php.h" @@ -342,6 +342,7 @@ while (*walk) if ('\\' == *walk && '0' <= walk[1] && '9' >= walk[1] + && walk[1] - '0' <= re.re_nsub && subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1) { new_l += subs[walk[1] - '0'].rm_eo @@ -369,6 +370,7 @@ while (*walk) if ('\\' == *walk && '0' <= walk[1] && '9' >= walk[1] + && walk[1] - '0' <= re.re_nsub && subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1 /* this next case shouldn't happen. it does. */

« previous php.cvs (#12387) next »