[GIT-PULLS] [php-src] PR #23240: ext/zip: ZipArchive::extractTo() and getFrom*() success on CRC-corrup…

[email protected] (devnexen)
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/23240
Author: devnexen

…ted entries.

zip_fclose() returns positive error codes, so the extraction's n < 0 check treated a failed read as success and wrote corrupt data to disk. getFromName()/getFromIndex() read exactly sb.size bytes, never reaching end of file where libzip validates the CRC, and returned the corrupt data silently. Read errors now fail with a warning.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.