aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2017-11-01 16:53:51 +0100
committerJohn Högberg <[email protected]>2017-11-02 08:35:51 +0100
commit9b1f2439845e5627a00fb816244af06d77c2d70a (patch)
tree7086d88ecfb6602a9a5ac88a491f64014d35c910 /lib
parenta98379d0519c28f9bc9b673ed2c09fb1ad52456e (diff)
downloadotp-9b1f2439845e5627a00fb816244af06d77c2d70a.tar.gz
otp-9b1f2439845e5627a00fb816244af06d77c2d70a.tar.bz2
otp-9b1f2439845e5627a00fb816244af06d77c2d70a.zip
Only apply EOS behaviors if there's pending data
Diffstat (limited to 'lib')
-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 1afcd155b3..b20d64ec6a 100644
--- a/lib/kernel/test/zlib_SUITE.erl
+++ b/lib/kernel/test/zlib_SUITE.erl
@@ -652,6 +652,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))),