File: 119-CVE-2007-1824-MOPB-42.patch

package info (click to toggle)
php5 5.2.0%2Bdfsg-8%2Betch16
  • links: PTS
  • area: main
  • in suites: etch
  • size: 58,940 kB
  • ctags: 45,388
  • sloc: ansic: 533,605; sh: 17,835; php: 11,336; cpp: 4,289; xml: 3,809; yacc: 2,446; lex: 2,174; makefile: 1,150; tcl: 1,128; awk: 693; perl: 71; sql: 22; pascal: 15
file content (15 lines) | stat: -rw-r--r-- 643 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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';