SharpZipLib icon indicating copy to clipboard operation
SharpZipLib copied to clipboard

Trailing zeros in input file causes exception, other zip software can read

Open RoVaDePi opened this issue 11 months ago • 2 comments

Describe the bug

We had a bug which made files with lots of trailing zeros, our old zip library had no issue with them but SharpZipLib does. We have since fixed the bug but were wondering if it's possible to read these files with trailing zeros?

Reproduction Code

https://dotnetfiddle.net/iCF2A4

Steps to reproduce

See repro code

Expected behavior

I expected to be able to read the file

Operating System

No response

Framework Version

.NET Framework 4.x

Tags

ZIP

Additional context

No response

RoVaDePi avatar Jan 30 '25 10:01 RoVaDePi

Trailing zeros does in fact make the zip file invalid; you would need to update the size of comment to make it valid again.

jhudsoncedaron avatar May 08 '25 16:05 jhudsoncedaron

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

SourceproStudio avatar May 08 '25 16:05 SourceproStudio