diff options
Diffstat (limited to 'ext/phar/zip.c')
-rw-r--r-- | ext/phar/zip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/phar/zip.c b/ext/phar/zip.c index 73a11870aa..a29a75d212 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -418,7 +418,7 @@ foundit: php_stream_seek(fp, sizeof(phar_zip_file_header) + entry.header_offset + entry.filename_len + PHAR_GET_16(zipentry.extra_len), SEEK_SET); sig = (char *) emalloc(entry.uncompressed_filesize); read = php_stream_read(fp, sig, entry.uncompressed_filesize); - if (read != entry.uncompressed_filesize) { + if (read != entry.uncompressed_filesize || read <= 8) { php_stream_close(sigfile); efree(sig); PHAR_ZIP_FAIL("signature cannot be read"); |