summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2018-04-22 20:28:35 -0700
committerStanislav Malyshev <stas@php.net>2018-04-22 20:28:35 -0700
commit83e7618f05cea9ad8ef17dfc5cbf05939a5d63dd (patch)
treefc4979e1ee10a15f6402143c0a6f0d18e9823293
parent98e43a33c88b2d0839ca0857385a7bd0ee545880 (diff)
parentff83c00715f6e036da5e5b627a742d2697871ae1 (diff)
downloadphp-git-83e7618f05cea9ad8ef17dfc5cbf05939a5d63dd.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Add a bit of defensive conding for bug #76155
-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 3cd29f6506..961be29fd3 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -1835,7 +1835,7 @@ static int phar_check_str(const char *fname, const char *ext_str, int ext_len, i
char test[51];
const char *pos;
- if (ext_len >= 50) {
+ if (ext_len < 0 || ext_len >= 50) {
return FAILURE;
}