# 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&pathrev=PHP_5_2&view=patch
Index: php5-5.2.0/main/streams/filter.c
===================================================================
--- php5-5.2.0.orig/main/streams/filter.c	2006-10-12 01:11:26.000000000 +0200
+++ php5-5.2.0/main/streams/filter.c	2007-04-22 20:17:57.000000000 +0200
@@ -264,7 +264,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';
