]> granicus.if.org Git - php/commitdiff
- MFH: Fix NULL-termination issue
authorDerick Rethans <derick@php.net>
Sun, 14 Apr 2002 08:50:22 +0000 (08:50 +0000)
committerDerick Rethans <derick@php.net>
Sun, 14 Apr 2002 08:50:22 +0000 (08:50 +0000)
ext/zip/zip.c

index 7efb16db7b358fcc532baeb54355b03c3d1c4dd3..506552207ca52e0c0389cc7c4e13c558e63f1cd4 100644 (file)
@@ -282,6 +282,7 @@ PHP_FUNCTION(zip_entry_read)
 
        buf = emalloc(len + 1);
        ret = zzip_read(entry->fp, buf, len);
+       buf[ret] = 0;
        if (ret == 0) {
                RETURN_FALSE;
        } else {