gianlucabertani/Objective-Zip

Buffer length too short

alexvolchek opened this issue · 3 comments

What is the point of case if (len > UINT16_MAX) return UNZ_PARAMERROR; in unzReadCurrentFile?
It fails on any file more than 65kb.

The limit applies to the buffer size, not to the file size. You can always read the file with a loop, using a buffer shorter than 65 KB. The README contains such an example. You can also find, in the source files, a (commented-out) unit test that zips and unzips a 5 GB file.

Anyway, I am trying to understand with the maintainer of MiniZip why this limit has been added. Since it has been introduced only recently, maybe it can be lifted. Will keep you updated.

I can confirm this problem! Until a few weeks ago this was no issue!
EDIT: after reverting to 1.0.3, the problem does not occur anymore. :-/

Got into the same issue with 1.0.5. Thanks for @flaushi comment, reverting to 1.0.3 resolved the issue.