com php-src: Fixed crach because of dereferencing of NULL pointer: ext/standard/exec.c
| From: | Dmitry Stogov | Date: | Tue, 25 Feb 2014 12:25:45 +0000 |
| Subject: | com php-src: Fixed crach because of dereferencing of NULL pointer: ext/standard/exec.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77920@lists.php.net to get a copy of this message | ||
Commit: fe5c1cc48fa493364537c033335f0c04aef62213
Author: Dmitry Stogov <dmitry@zend.com> Tue, 25 Feb 2014 16:25:45 +0400
Parents: 77abd35b784e38afea5d1cd6613ec40372162ba1
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fe5c1cc48fa493364537c033335f0c04aef62213
Log:
Fixed crach because of dereferencing of NULL pointer
Changed paths:
M ext/standard/exec.c
Diff:
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 7c440bf..fddf580 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);
}
}