Can not read zip header if it ends to far from the end of file #321

Open
opened 2026-01-29 22:10:07 +00:00 by claunia · 0 comments
Owner

Originally created by @dds72 on GitHub (Sep 7, 2018).

We need to support old archives with much of trailing zeros in the end.
Changing MAX_ITERATIONS_FOR_DIRECTORY_HEADER in SeekableZipHeaderFactory to higher value did the trick.
Other zip libraries can read this header properly, but this library is the one which has both net45 and netstandard2.0 targets and read zip files protected with password.
Why it have so low value?
Can it be increased?

Originally created by @dds72 on GitHub (Sep 7, 2018). We need to support old archives with much of trailing zeros in the end. Changing MAX_ITERATIONS_FOR_DIRECTORY_HEADER in SeekableZipHeaderFactory to higher value did the trick. Other zip libraries can read this header properly, but this library is the one which has both net45 and netstandard2.0 targets and read zip files protected with password. Why it have so low value? Can it be increased?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#321