Bug 1867315 - Check ENDSIG for ZIP64 too r=necko-reviewers,valentin

Differential Revision: https://phabricator.services.mozilla.com/D195109
This commit is contained in:
Kagami Sascha Rosylight
2023-12-01 12:00:06 +00:00
parent 3497dda74d
commit 13650e777b
2 changed files with 2 additions and 1 deletions

View File

@@ -715,7 +715,7 @@ nsresult nsZipArchive::BuildFileList(PRFileDesc* aFd)
sig = 0;
} /* while reading central directory records */
if (sig != ENDSIG) {
if (sig != ENDSIG && sig != ENDSIG64) {
return NS_ERROR_FILE_CORRUPTED;
}

View File

@@ -83,6 +83,7 @@ typedef struct ZipEnd_ {
#define LOCALSIG 0x04034B50l
#define CENTRALSIG 0x02014B50l
#define ENDSIG 0x06054B50l
#define ENDSIG64 0x6064B50l
/* extra fields */
#define EXTENDED_TIMESTAMP_FIELD 0x5455