Zip64ExtraField should read StartDiskNumber as uint32 #31825
Labels
area-System.IO.Compression
good first issue
Issue should be easy to implement, good for first-time contributors
help wanted
[up-for-grabs] Good issue for external contributors
Milestone
Uh oh!
There was an error while loading. Please reload this page.
According to https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT:
And the spec for the Zip64ExtraField doesn't note otherwise:
However, we are reading the "Disk Start Number" as a signed int32, and then throwing an exception if the number is negative:
runtime/src/libraries/System.IO.Compression/src/System/IO/Compression/ZipBlocks.cs
Lines 209 to 218 in 33b7ed8
We should change this to
zip64Block._startDiskNumber = reader.ReadUInt32();
, remove the exception, and flow theuint
value everywhere.Looking at the reference source:
https://referencesource.microsoft.com/#WindowsBase/Base/MS/Internal/IO/Zip/ZipIOExtraFieldZip64Element.cs,101
That is reading as
uint32
as well. We should update to the same.Here is a prototype of the change: eerhardt@b790a94
The text was updated successfully, but these errors were encountered: