File php-CVE-2019-9021.patch of Package php7

X-Git-Url: http://208.43.231.11:8000/?p=php-src.git;a=blobdiff_plain;f=ext%2Fphar%2Fphar.c;h=6e5cec2462a6ded53d4379ea9a69487a60d5c43c;hp=47ff8cd790730dbc3520e47faa86327e2987a238;hb=428d8164ffcf6f75a6cc9d4056e54bfd450dac03;hpb=4fc0bceb7c39be206c73f69993e3936ef329f656

diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 47ff8cd..6e5cec2 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -2017,7 +2017,7 @@ next_extension:
 	}
 
 	while (pos != filename && (*(pos - 1) == '/' || *(pos - 1) == '\0')) {
-		pos = memchr(pos + 1, '.', filename_len - (pos - filename) + 1);
+		pos = memchr(pos + 1, '.', filename_len - (pos - filename) - 1);
 		if (!pos) {
 			return FAILURE;
 		}
openSUSE Build Service is sponsored by