summaryrefslogtreecommitdiff
path: root/ext/phar
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2018-12-03 00:42:35 -0800
committerStanislav Malyshev <stas@php.net>2018-12-03 00:42:35 -0800
commit5718d73dbbca4a1940fef48749ae8c43cc4157a0 (patch)
tree2e6f0f6246cd4009858587ffcc069528736c1d22 /ext/phar
parent66a0f061f62410ccab6420ea1ccfc6b7652c7e83 (diff)
parent48f0f73f75c0059ba5d9b73cb4e5faeeaea49c47 (diff)
downloadphp-git-5718d73dbbca4a1940fef48749ae8c43cc4157a0.tar.gz
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6: Fix bug #77143 - add more checks to buffer reads
Diffstat (limited to 'ext/phar')
-rw-r--r--ext/phar/phar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 1156e6b557..308c1e92e8 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -649,7 +649,7 @@ int phar_parse_metadata(char **buffer, zval *metadata, php_uint32 zip_metadata_l
#define MANIFEST_FIXED_LEN 18
#define SAFE_PHAR_GET_32(buffer, endbuffer, var) \
- if (UNEXPECTED(buffer + 4 >= endbuffer)) { \
+ if (UNEXPECTED(buffer + 4 > endbuffer)) { \
MAPPHAR_FAIL("internal corruption of phar \"%s\" (truncated manifest header)"); \
} \
PHAR_GET_32(buffer, var);