]> granicus.if.org Git - php/commitdiff
initialize glob struct
authorAntony Dovgal <tony2001@php.net>
Mon, 16 Jul 2007 20:29:21 +0000 (20:29 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 16 Jul 2007 20:29:21 +0000 (20:29 +0000)
ext/standard/dir.c

index c6f73488674e9d7b4acd19013f4b13d6806cf55f..b7c8175becf095999f464e7ca8e4443b18b8dbe5 100644 (file)
@@ -412,6 +412,7 @@ PHP_FUNCTION(glob)
                efree(basename);
        }
 
+       memset(&globbuf, 0, sizeof(glob_t));
        globbuf.gl_offs = 0;
        if (0 != (ret = glob(pattern, flags & GLOB_FLAGMASK, NULL, &globbuf))) {
 #ifdef GLOB_NOMATCH