From 5e25c15d6c41dc53e5657b676bd9a9cecacbaced Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sat, 20 Apr 2002 18:58:20 +0000 Subject: [PATCH] allocate space for NUL --- ext/dio/dio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.40.0