From a8504dc59209fd2e41c7bb8c8e8692fd2e621a7e Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Sat, 20 Apr 2002 16:08:30 +0000 Subject: [PATCH] realloc buffer down --- ext/dio/dio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/dio/dio.c b/ext/dio/dio.c index 1beec45db3..7f25bf17df 100644 --- a/ext/dio/dio.c +++ b/ext/dio/dio.c @@ -187,8 +187,10 @@ PHP_FUNCTION(dio_read) if (res <= 0) { RETURN_NULL(); } - + + data = erealloc(data, res); data[res] = 0; + RETURN_STRINGL(data, res, 0); } /* }}} */ -- 2.40.0