dmitry Mon Dec 25 13:11:48 2006 UTC Modified files: /php-src/main/streams filter.c Log: Fixed heap overflow http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.39&r2=1.40&diff_format=u Index: php-src/main/streams/filter.c diff -u php-src/main/streams/filter.c:1.39 php-src/main/streams/filter.c:1.40 --- php-src/main/streams/filter.c:1.39 Tue Nov 21 15:47:44 2006 +++ php-src/main/streams/filter.c Mon Dec 25 13:11:48 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filter.c,v 1.39 2006/11/21 15:47:44 tony2001 Exp $ */ +/* $Id: filter.c,v 1.40 2006/12/25 13:11:48 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -323,7 +323,8 @@ /* try a wildcard */ char *wildname; - wildname = estrdup(filtername); + wildname = emalloc(n+3); + memcpy(wildname, filtername, n+1); period = wildname + (period - filtername); while (period && !filter) { *period = '\0';
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php