aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2017-11-09 16:15:41 +0100
committerErlang/OTP <[email protected]>2017-11-09 16:15:41 +0100
commit8ceee73b703976cdc09687b4c0efcf2c490c3954 (patch)
treea463ea75d7f8c2f4756d9f5860b2c6b5955b05f9 /lib/kernel/test
parent0a3d5ad6f2dec30f450e1a29f1150a139cd4777f (diff)
parent9b1f2439845e5627a00fb816244af06d77c2d70a (diff)
downloadotp-8ceee73b703976cdc09687b4c0efcf2c490c3954.tar.gz
otp-8ceee73b703976cdc09687b4c0efcf2c490c3954.tar.bz2
otp-8ceee73b703976cdc09687b4c0efcf2c490c3954.zip
Merge branch 'john/erts/fix-gunzip-eos/OTP-14730/ERL-507' into maint-20
* john/erts/fix-gunzip-eos/OTP-14730/ERL-507: Only apply EOS behaviors if there's pending data
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/zlib_SUITE.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl
index 6d4e21b8cf..26602bdcda 100644
--- a/lib/kernel/test/zlib_SUITE.erl
+++ b/lib/kernel/test/zlib_SUITE.erl
@@ -686,6 +686,11 @@ api_g_un_zip(Config) when is_list(Config) ->
Concatenated = <<Bin/binary, Bin/binary>>,
?m(Concatenated, zlib:gunzip([Comp, Comp])),
+ %% Don't explode if the uncompressed size is a perfect multiple of the
+ %% internal inflate chunk size.
+ ChunkSizedData = <<0:16384/unit:8>>,
+ ?m(ChunkSizedData, zlib:gunzip(zlib:gzip(ChunkSizedData))),
+
%% Bad CRC; bad length.
BadCrc = bad_crc_data(),
?m(?EXIT(data_error),(catch zlib:gunzip(BadCrc))),