summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2002-04-20 16:08:30 +0000
committerSterling Hughes <sterling@php.net>2002-04-20 16:08:30 +0000
commita8504dc59209fd2e41c7bb8c8e8692fd2e621a7e (patch)
tree274c15a64174b064a18ceb7c920bed7c37aa2300 /ext
parent20c0fed127aae1c0f5af6c43ef92f4f2b51f3d0d (diff)
downloadphp-git-a8504dc59209fd2e41c7bb8c8e8692fd2e621a7e.tar.gz
realloc buffer down
Diffstat (limited to 'ext')
-rw-r--r--ext/dio/dio.c4
1 files changed, 3 insertions, 1 deletions
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);
}
/* }}} */