diff options
| author | Felipe Pena <felipe@php.net> | 2009-07-30 12:06:40 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2009-07-30 12:06:40 +0000 |
| commit | f8ee7db001a18e5640ed4e523c90b1b75ad3e0bb (patch) | |
| tree | 8897fa4672467606944716561a959c7325d94a86 | |
| parent | 96a053288fd227cf4a27e10081439d425d4ebc71 (diff) | |
| download | php-git-f8ee7db001a18e5640ed4e523c90b1b75ad3e0bb.tar.gz | |
- Fixed bug #49108 (2nd scan_dir produces seg fault)
| -rw-r--r-- | NEWS | 1 | ||||
| -rw-r--r-- | ext/standard/dir.c | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -8,6 +8,7 @@ - Fixed signature generation/validation for zip archives in ext/phar. (Greg) - Fixed memory leak in stream_is_local(). (Felipe) +- Fixed bug #49108 (2nd scan_dir produces seg fault). (Felipe) - Fixed bug #49065 ("disable_functions" php.ini option does not work on Zend extensions). (Stas) - Fixed bug #49064 (--enable-session=shared does not work: undefined symbol: diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 31566d3398..5beaae25f5 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -556,7 +556,9 @@ PHP_FUNCTION(scandir) RETURN_FALSE; } - context = php_stream_context_from_zval(zcontext, 0); + if (zcontext) { + context = php_stream_context_from_zval(zcontext, 0); + } if (!flags) { n = php_stream_scandir(dirn, &namelist, context, (void *) php_stream_dirent_alphasort); |
