summaryrefslogtreecommitdiff
path: root/ext/phar/tar.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2016-01-14 22:58:40 -0800
committerStanislav Malyshev <stas@php.net>2016-01-14 22:58:40 -0800
commit4c2424eb24b0178456acc404dbfff528cdc44197 (patch)
tree83d7d11c38562074be21b83251b0f3cb48c9ff82 /ext/phar/tar.c
parentd7f8d9e3a9babf0e4f0c1a5590e1feb5e69bd84a (diff)
downloadphp-git-4c2424eb24b0178456acc404dbfff528cdc44197.tar.gz
Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()
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 2eb1a23676..5d121cb030 100644
--- a/ext/phar/tar.c
+++ b/ext/phar/tar.c
@@ -348,7 +348,7 @@ bail:
entry.filename_len = entry.uncompressed_filesize;
/* Check for overflow - bug 61065 */
- if (entry.filename_len == UINT_MAX) {
+ if (entry.filename_len == UINT_MAX || entry.filename_len == 0) {
if (error) {
spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (invalid entry size)", fname);
}