summaryrefslogtreecommitdiff
path: root/lang/php5/patches/patch-ae
blob: 80ef96cc0cf2035168c341e2c859058b04581497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$NetBSD: patch-ae,v 1.1 2007/08/01 01:40:08 taca Exp $

Fix for CVE-2007-3806.

--- ext/standard/dir.c.orig	2007-02-25 02:16:23.000000000 +0900
+++ ext/standard/dir.c
@@ -395,6 +395,7 @@ PHP_FUNCTION(glob)
 	} 
 #endif
 
+	memset(&globbuf, 0, sizeof(glob_t));
 	globbuf.gl_offs = 0;
 	if (0 != (ret = glob(pattern, flags & GLOB_FLAGMASK, NULL, &globbuf))) {
 #ifdef GLOB_NOMATCH