diff options
author | Loïc Hoguin <[email protected]> | 2015-03-03 18:55:22 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-03-03 23:16:44 +0100 |
commit | 7d82a632f4837764ac79dfb4986d102060bd3080 (patch) | |
tree | 050bd036fba730bdf99a0e9e96fb227ae704c283 /lib | |
parent | 5f08be20308db9680c9d7e1f01242cedd84a2b4e (diff) | |
download | otp-7d82a632f4837764ac79dfb4986d102060bd3080.tar.gz otp-7d82a632f4837764ac79dfb4986d102060bd3080.tar.bz2 otp-7d82a632f4837764ac79dfb4986d102060bd3080.zip |
Update zlib:zwindowbits/0 type to accept 8 and -8
Commit 7e8f5a776cbfa376e03369d058a90c8dd9f217fc (importing R11B-3)
updated zlib, which had changed what values it accepts for window
bits from 9-15 to 8-15.
From deflate.c:
- windowBits < 9 || windowBits > 15 || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
+ windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+ strategy < 0 || strategy > Z_FIXED) {
return Z_STREAM_ERROR;
}
+ if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */
In inflate.c 8 was already an accepted value.
This commit updates OTP to also accept the values 8 and -8.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/test/zlib_SUITE.erl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl index 3be6f39d95..49ecad0014 100644 --- a/lib/kernel/test/zlib_SUITE.erl +++ b/lib/kernel/test/zlib_SUITE.erl @@ -146,8 +146,6 @@ api_deflateInit(Config) when is_list(Config) -> ?m(?BARG, zlib:deflateInit(Z1,default,deflated,-20,8,default)), ?m(?BARG, zlib:deflateInit(Z1,default,deflated,-7,8,default)), ?m(?BARG, zlib:deflateInit(Z1,default,deflated,7,8,default)), - ?m(?BARG, zlib:deflateInit(Z1,default,deflated,-8,8,default)), - ?m(?BARG, zlib:deflateInit(Z1,default,deflated,8,8,default)), ?m(?BARG, zlib:deflateInit(Z1,default,deflated,-15,0,default)), ?m(?BARG, zlib:deflateInit(Z1,default,deflated,-15,10,default)), @@ -169,7 +167,7 @@ api_deflateInit(Config) when is_list(Config) -> ?m(ok, zlib:deflateInit(Z12,default,deflated,-Wbits,8,default)), ?m(ok,zlib:close(Z11)), ?m(ok,zlib:close(Z12)) - end, lists:seq(9, 15)), + end, lists:seq(8, 15)), lists:foreach(fun(MemLevel) -> ?line Z = zlib:open(), @@ -277,7 +275,7 @@ api_inflateInit(Config) when is_list(Config) -> ?m(ok, zlib:inflateInit(Z12,-Wbits)), ?m(ok,zlib:close(Z11)), ?m(ok,zlib:close(Z12)) - end, lists:seq(9,15)), + end, lists:seq(8,15)), ?m(?BARG, zlib:inflateInit(gurka, -15)), ?m(?BARG, zlib:inflateInit(Z1, 7)), ?m(?BARG, zlib:inflateInit(Z1, -7)), |