zlib
zlib copied to clipboard
Inflate: max distance taken from header even if bigger window size provided
Ref: https://github.com/nodeca/pako/issues/174#issuecomment-535347692
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.
- Here you ignore window size from header, if been passed in options before.
- But here you still use
leninstead ofstate->wbitsto definestate->dmax. Than make passing biggerwindowBits"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?
i think deflate cannot generate such data whose distance is greater than the window size( written in zlib header )