Skip to content

Commit 0b672b5

Browse files
author
David Pierson
committed
Remove version + size checks on Zip64 header Forum 10512
1 parent 0ab2d09 commit 0b672b5

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

src/Zip/ZipFile.cs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,21 +1043,8 @@ long TestLocalHeader(ZipEntry entry, HeaderTest tests)
10431043
// Extra data / zip64 checks
10441044
if (localExtraData.Find(1))
10451045
{
1046-
// TODO Check for tag values being distinct.. Multiple zip64 tags means what?
1047-
1048-
// Zip64 extra data but 'extract version' is too low
1049-
if (extractVersion < ZipConstants.VersionZip64)
1050-
{
1051-
throw new ZipException(
1052-
string.Format("Extra data contains Zip64 information but version {0}.{1} is not high enough",
1053-
extractVersion / 10, extractVersion % 10));
1054-
}
1055-
1056-
// Zip64 extra data but size fields dont indicate its required.
1057-
if (((uint)size != uint.MaxValue) && ((uint)compressedSize != uint.MaxValue))
1058-
{
1059-
throw new ZipException("Entry sizes not correct for Zip64");
1060-
}
1046+
// 2010-03-04 Forum 10512: removed checks for version >= ZipConstants.VersionZip64
1047+
// and size or compressedSize = MaxValue, due to rogue creators.
10611048

10621049
size = localExtraData.ReadLong();
10631050
compressedSize = localExtraData.ReadLong();

0 commit comments

Comments
 (0)