Skip to content

Commit 8ec3e47

Browse files
committed
Update ZipFile.cs
Correct the zip specification version by only checking the lower bits.
1 parent c49a22d commit 8ec3e47

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Zip/ZipFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ long TestLocalHeader(ZipEntry entry, HeaderTest tests)
10231023
throw new ZipException(string.Format("Wrong local header signature @{0:X}", offsetOfFirstEntry + entry.Offset));
10241024
}
10251025

1026-
short extractVersion = ( short )ReadLEUshort();
1026+
short extractVersion = ( short )ReadLEUshort() & 0x00ff;
10271027
short localFlags = ( short )ReadLEUshort();
10281028
short compressionMethod = ( short )ReadLEUshort();
10291029
short fileTime = ( short )ReadLEUshort();

0 commit comments

Comments
 (0)