From 2cc64c28f0d487aefed80ea8855b497679f22c27 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 11 Mar 2012 18:15:13 +0000 Subject: [PATCH] Fixed bug #60569 (Nullbyte truncates Exception $message). --- NEWS | 1 + Zend/tests/bug60569.phpt | Bin 0 -> 288 bytes Zend/zend_exceptions.c | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Zend/tests/bug60569.phpt diff --git a/NEWS b/NEWS index 7973b99beda..33181443551 100644 --- 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 index 0000000000000000000000000000000000000000..56aaa2c6024f077fe9c075b5047828fb9d4c73ef GIT binary patch literal 288 zcma)%%L>9U6hz%NUva5jBw(Zn3Zk~4L=aR2UAPdW)=Mhb2T5uz;=kLX_}IChGjoRX zjaY9uC*xc~v*&hueW1(yd_I&0!Kge51A`jGHN?!E(gd6swGJe<8R2|7n~Mq_`dO3_ zqe{3D%Zasw5!mZAMnI)f1-q;3!i%#9#4?de3rMi|^wJt*19FFIFpTKeAhNpl5~%$# rk2C5Z_avIdQ-iWrrSwFJ?^RA>yAqT7k~Zp;NZN7Pk4)oj@<-wUXgFCR literal 0 HcmV?d00001 diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 308910dfb28..a83053e1206 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -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) {