]> granicus.if.org Git - php/commitdiff
allocate space for NUL
authorSascha Schumann <sas@php.net>
Sat, 20 Apr 2002 18:58:20 +0000 (18:58 +0000)
committerSascha Schumann <sas@php.net>
Sat, 20 Apr 2002 18:58:20 +0000 (18:58 +0000)
ext/dio/dio.c

index 7f25bf17dfc973fb7791ffbfd484087e29422d80..90ba912fc3dbe34be48c6ae0ee1306401089402b 100644 (file)
@@ -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);