From: Dmitry Stogov Date: Tue, 25 Feb 2014 12:25:45 +0000 (+0400) Subject: Fixed crach because of dereferencing of NULL pointer X-Git-Tag: POST_PHPNG_MERGE~412^2~530 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe5c1cc48fa493364537c033335f0c04aef62213;p=php Fixed crach because of dereferencing of NULL pointer --- diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 7c440bf791..fddf580508 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -460,7 +460,7 @@ PHP_FUNCTION(shell_exec) ret = php_stream_copy_to_mem(stream, PHP_STREAM_COPY_ALL, 0); php_stream_close(stream); - if (ret->len > 0) { + if (ret && ret->len > 0) { RETVAL_STR(ret); } }