summaryrefslogtreecommitdiff
path: root/ext/phar/tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/phar/tar.c')
-rw-r--r--ext/phar/tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/phar/tar.c b/ext/phar/tar.c
index aeb5c7ef1e..72b653db97 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -286,7 +286,7 @@ bail:
}
curloc = php_stream_tell(fp);
read = php_stream_read(fp, buf, size);
- if (read != size) {
+ if (read != size || read <= 8) {
if (error) {
spprintf(error, 4096, "phar error: tar-based phar \"%s\" signature cannot be read", fname);
}