]> 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)
NEWS
Zend/tests/bug60569.phpt [new file with mode: 0644]
Zend/zend_exceptions.c

diff --git a/NEWS b/NEWS
index 7973b99bedafdf61935a7c4af8af39cfbef2ad55..331814435513bc7ddc4d31bc19372bddfee17c03 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ PHP                                                                        NEWS
   . Fixed bug #60825 (Segfault when running symfony 2 tests).
     (Dmitry, Laruence)
   . Fixed bug #60801 (strpbrk() mishandles NUL byte). (Adam)
+  . Fixed bug #60569 (Nullbyte truncates Exception $message). (Ilia)
   . Fixed bug #60227 (header() cannot detect the multi-line header with CR).
     (rui, Gustavo)
   . Fixed bug #52719 (array_walk_recursive crashes if third param of the
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 308910dfb28d545d277c2431fd13bcf75318749b..a83053e12066204a8b5a678e253055c789608b97 100644 (file)
@@ -192,7 +192,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) {