From 9b1f2439845e5627a00fb816244af06d77c2d70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Wed, 1 Nov 2017 16:53:51 +0100 Subject: Only apply EOS behaviors if there's pending data --- lib/kernel/test/zlib_SUITE.erl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/kernel') 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 = <>, ?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))), -- cgit v1.2.3