Fixed bug #71561 (NULL pointer dereference in Zip::ExtractTo)

This commit is contained in:
Xinchen Hui 2016-02-09 23:32:20 +08:00
parent 5fdfab743d
commit f45752eb83
2 changed files with 4 additions and 1 deletions

View file

@ -2713,7 +2713,7 @@ static ZIPARCHIVE_METHOD(extractTo)
for (i = 0; i < filecount; i++) {
char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED);
if (!php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) {
if (!file || !php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) {
RETURN_FALSE;
}
}