summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 898d1dac30..56fa253a6f 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;
}