mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-10 22:00:58 +01:00
Fix bug that accepted invalid zlib header when windowBits is zero.
6cef1de740
This commit is contained in:
parent
a98f90806e
commit
8f630ba374
1 changed files with 1 additions and 1 deletions
|
@ -469,7 +469,7 @@ const inflate = (strm, flush) => {
|
||||||
if (state.wbits === 0) {
|
if (state.wbits === 0) {
|
||||||
state.wbits = len;
|
state.wbits = len;
|
||||||
}
|
}
|
||||||
else if (len > state.wbits) {
|
if (len > 15 || len > state.wbits) {
|
||||||
strm.msg = 'invalid window size';
|
strm.msg = 'invalid window size';
|
||||||
state.mode = BAD;
|
state.mode = BAD;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue