]> granicus.if.org Git - php/commitdiff
Fixed bug #60569 (Nullbyte truncates Exception $message).
authorIlia Alshanetsky <iliaa@php.net>
Sun, 11 Mar 2012 18:15:13 +0000 (18:15 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 11 Mar 2012 18:15:13 +0000 (18:15 +0000)
Zend/tests/bug60569.phpt [new file with mode: 0644]
Zend/zend_exceptions.c

diff --git a/Zend/tests/bug60569.phpt b/Zend/tests/bug60569.phpt
new file mode 100644 (file)
index 0000000..56aaa2c
Binary files /dev/null and b/Zend/tests/bug60569.phpt differ
index 93b4d651a0405126eadc030033469ecf68149116..7bb7792a4c8052d57fd14f2c005950d9827bf9cf 100644 (file)
@@ -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) {