Skip to content

Commit defd00a

Browse files
committed
- fix Fixed NULL pointer dereference in ZipArchive::getArchiveComment, (CVE-2010-3709), report&patch from Maksymilian Arciemowicz
1 parent baa6f7f commit defd00a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/zip/php_zip.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,9 @@ static ZIPARCHIVE_METHOD(getArchiveComment)
19741974
}
19751975

19761976
comment = zip_get_archive_comment(intern, &comment_len, (int)flags);
1977+
if(comment==NULL) {
1978+
RETURN_FALSE;
1979+
}
19771980
RETURN_STRINGL((char *)comment, (long)comment_len, 1);
19781981
}
19791982
/* }}} */

0 commit comments

Comments
 (0)