summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2012-03-11 18:15:13 +0000
committerIlia Alshanetsky <iliaa@php.net>2012-03-11 18:15:13 +0000
commit3d9824a7985a2caf4c12ac6fc5b3ffc3e7c996c9 (patch)
treed3c05a894f8aaa7a74f1367475856f155ff0969a
parent80cb6e56f61b00791169aeb6b018eee5d27bc848 (diff)
downloadphp-git-3d9824a7985a2caf4c12ac6fc5b3ffc3e7c996c9.tar.gz
Fixed bug #60569 (Nullbyte truncates Exception $message).
-rw-r--r--NEWS1
-rw-r--r--Zend/tests/bug60569.phptbin0 -> 288 bytes
-rw-r--r--Zend/zend_exceptions.c2
3 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 6ff05dbe2a..8dba8c881a 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,7 @@ PHP NEWS
error). (Stefan)
. Fixed bug #60573 (type hinting with "self" keyword causes weird errors).
(Laruence)
+ . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
. Fixed bug #52719 (array_walk_recursive crashes if third param of the
function is by reference). (Nikita Popov)
diff --git a/Zend/tests/bug60569.phpt b/Zend/tests/bug60569.phpt
new file mode 100644
index 0000000000..56aaa2c602
--- /dev/null
+++ b/Zend/tests/bug60569.phpt
Binary files differ
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 93b4d651a0..7bb7792a4c 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -205,7 +205,7 @@ ZEND_METHOD(exception, __construct)
object = getThis();
if (message) {
- zend_update_property_string(default_exception_ce, object, "message", sizeof("message")-1, message TSRMLS_CC);
+ zend_update_property_stringl(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC);
}
if (code) {