]> granicus.if.org Git - php/commitdiff
realloc buffer down
authorSterling Hughes <sterling@php.net>
Sat, 20 Apr 2002 16:08:30 +0000 (16:08 +0000)
committerSterling Hughes <sterling@php.net>
Sat, 20 Apr 2002 16:08:30 +0000 (16:08 +0000)
ext/dio/dio.c

index 1beec45db3c96cca88117b35c555072eac02c008..7f25bf17dfc973fb7791ffbfd484087e29422d80 100644 (file)
@@ -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);
 }
 /* }}} */