summaryrefslogtreecommitdiff
path: root/Zend/zend_exceptions.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-04-14 00:26:15 -0700
committerStanislav Malyshev <stas@php.net>2015-04-14 00:26:53 -0700
commitd3aeb8a204e1c8c41f455dbde1a7d2ea1cab26af (patch)
treef72f39ad650554bc205816ee0658800a1d6baa3d /Zend/zend_exceptions.c
parentae46d1ce19b789654e90bfcf91b11edc7de122a1 (diff)
parentd734e75599593fe552eebf9bf579d73addc75a1e (diff)
downloadphp-git-d3aeb8a204e1c8c41f455dbde1a7d2ea1cab26af.tar.gz
Merge branch 'PHP-5.4.40' into PHP-5.4
* PHP-5.4.40: update NEWS Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode) fix memory leak & add test Fix tests fix CVE num Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability) Fix test Additional fix for bug #69324 More fixes for bug #69152 Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar) Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER) Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
Diffstat (limited to 'Zend/zend_exceptions.c')
-rw-r--r--Zend/zend_exceptions.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index bf90ae7be3..1ca2eadbf4 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -591,6 +591,9 @@ ZEND_METHOD(exception, getTraceAsString)
str = &res;
trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC);
+ if(Z_TYPE_P(trace) != IS_ARRAY) {
+ RETURN_FALSE;
+ }
zend_hash_apply_with_arguments(Z_ARRVAL_P(trace) TSRMLS_CC, (apply_func_args_t)_build_trace_string, 3, str, len, &num);
s_tmp = emalloc(1 + MAX_LENGTH_OF_LONG + 7 + 1);