From: Sascha Schumann Date: Sat, 20 Apr 2002 18:58:20 +0000 (+0000) Subject: allocate space for NUL X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~536 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e25c15d6c41dc53e5657b676bd9a9cecacbaced;p=php allocate space for NUL --- diff --git a/ext/dio/dio.c b/ext/dio/dio.c index 7f25bf17df..90ba912fc3 100644 --- a/ext/dio/dio.c +++ b/ext/dio/dio.c @@ -188,7 +188,7 @@ PHP_FUNCTION(dio_read) RETURN_NULL(); } - data = erealloc(data, res); + data = erealloc(data, res + 1); data[res] = 0; RETURN_STRINGL(data, res, 0);