diff options
author | Stanislav Malyshev <stas@php.net> | 2018-12-03 00:42:35 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2018-12-03 00:42:35 -0800 |
commit | 5718d73dbbca4a1940fef48749ae8c43cc4157a0 (patch) | |
tree | 2e6f0f6246cd4009858587ffcc069528736c1d22 /ext/phar | |
parent | 66a0f061f62410ccab6420ea1ccfc6b7652c7e83 (diff) | |
parent | 48f0f73f75c0059ba5d9b73cb4e5faeeaea49c47 (diff) | |
download | php-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.c | 2 |
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); |