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

Inflate: max distance taken from header even if bigger window size provided #449

Open
puzrin opened this issue Sep 26, 2019 · 1 comment

Comments

@puzrin
Copy link

puzrin commented Sep 26, 2019

Ref: nodeca/pako#174 (comment)

Found this, when been reported about problem with decompressing data with wrong window size in header. I tried to force windowBits to max, but this did not helped.

  1. Here you ignore window size from header, if been passed in options before.
  2. But here you still use len instead of state->wbits to define state->dmax. Than make passing bigger windowBits "useless" for inflate, when header exists.

I don't know is this intended behaviour or not. Look like a bug.

Could you comment or fix?

@minchai23
Copy link

i think deflate cannot generate such data whose distance is greater than the window size( written in zlib header )

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

2 participants