summaryrefslogtreecommitdiff
path: root/ext/zip/zip.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zip/zip.c')
-rw-r--r--ext/zip/zip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/zip/zip.c b/ext/zip/zip.c
index 7efb16db7b..506552207c 100644
--- a/ext/zip/zip.c
+++ b/ext/zip/zip.c
@@ -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 {