Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip file size too low #60

Open
anhbontb opened this issue May 27, 2017 · 4 comments
Open

Zip file size too low #60

anhbontb opened this issue May 27, 2017 · 4 comments

Comments

@anhbontb
Copy link

Hi !
On version 1.0.5. I found some zip file error by following code:
if (len > UINT16_MAX)
return UNZ_PARAMERROR;

with #define UINT16_MAX 65535

Plesae check.

Thank you.

@gianlucabertani
Copy link
Owner

Hello,

could you elaborate? What kind of error are you talking about?

/cc @nmoinvaz

@nmoinvaz
Copy link

The length parameter or buffer size is too long. It should not exceed 65535.

@gianlucabertani
Copy link
Owner

@nmoinvaz Why did you add this limit, if I may ask?

@nmoinvaz
Copy link

Because zlib's z_stream_s uses an uInt for avail_in and avail_out which they define as a minimum of 16 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants