Fix unzip warning with apelink generated symtabs

This commit is contained in:
Justine Tunney 2023-11-18 16:56:11 -08:00
parent 3e6d536822
commit 0c89516ac5
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
17 changed files with 192 additions and 59 deletions

View file

@ -27,7 +27,7 @@ int64_t GetZipCfileCompressedSize(const uint8_t *z) {
}
const uint8_t *p = ZIP_CFILE_EXTRA(z);
const uint8_t *pe = p + ZIP_CFILE_EXTRASIZE(z);
for (; p < pe; p += ZIP_EXTRA_SIZE(p)) {
for (; p + ZIP_EXTRA_SIZE(p) <= pe; p += ZIP_EXTRA_SIZE(p)) {
if (ZIP_EXTRA_HEADERID(p) == kZipExtraZip64) {
if (8 <= ZIP_EXTRA_CONTENTSIZE(p)) {
return READ64LE(ZIP_EXTRA_CONTENT(p));