You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
1.2 KiB

From: Markus Koschany <apo@debian.org>
Date: Sun, 16 Jul 2017 19:28:03 +0200
Subject: CVE-2017-11147
Bug-Upstream: https://bugs.php.net/bug.php?id=73773
Origin: http://git.php.net/?p=php-src.git;a=commitdiff;h=e5246580a85f031e1a3b8064edbaa55c1643a451
---
ext/phar/phar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index b235cc0..2bc4300 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -1055,7 +1055,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char
entry.is_persistent = mydata->is_persistent;
for (manifest_index = 0; manifest_index < manifest_count; ++manifest_index) {
- if (buffer + 24 > endbuffer) {
+ if (buffer + 28 > endbuffer) {
MAPPHAR_FAIL("internal corruption of phar \"%s\" (truncated manifest entry)")
}
@@ -1069,7 +1069,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char
entry.manifest_pos = manifest_index;
}
- if (entry.filename_len > endbuffer - buffer - 20) {
+ if (entry.filename_len > endbuffer - buffer - 24) {
MAPPHAR_FAIL("internal corruption of phar \"%s\" (truncated manifest entry)");
}