Skip to content

Commit fe994fd

Browse files
committed
Fix int/size_t confusion in isValidPharFilename (bug #73580)
1 parent b8645ef commit fe994fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/phar/phar_object.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,10 @@ PHP_METHOD(Phar, isValidPharFilename)
10621062
return;
10631063
}
10641064

1065+
if (ZEND_SIZE_T_INT_OVFL(fname_len)) {
1066+
RETURN_FALSE;
1067+
}
1068+
10651069
is_executable = executable;
10661070
RETVAL_BOOL(phar_detect_phar_fname_ext(fname, fname_len, &ext_str, &ext_len, is_executable, 2, 1) == SUCCESS);
10671071
}

0 commit comments

Comments
 (0)