dmitry Mon Dec 25 13:11:23 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/main/streams filter.c
Log:
Fixed heap overflow
http://cvs.php.net/viewvc.cgi/php-src/main/streams/filter.c?r1=1.17.2.3.2.4&r2=1.17.2.3.2.5&diff_format=u
Index: php-src/main/streams/filter.c
diff -u php-src/main/streams/filter.c:1.17.2.3.2.4
php-src/main/streams/filter.c:1.17.2.3.2.5
--- php-src/main/streams/filter.c:1.17.2.3.2.4 Tue Nov 21 20:58:17 2006
+++ php-src/main/streams/filter.c Mon Dec 25 13:11:23 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.17.2.3.2.4 2006/11/21 20:58:17 tony2001 Exp $ */
+/* $Id: filter.c,v 1.17.2.3.2.5 2006/12/25 13:11:23 dmitry Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -265,7 +265,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