From bb1d5c1fdd30550d4221ecd336e0be1206132a5c Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 24 Jan 2021 22:32:41 +0200 Subject: [PATCH] Tests: Add bad-1-lzma2-10.xz and also modify -9.xz. --- tests/files/README | 11 +++++++++-- tests/files/bad-1-lzma2-10.xz | Bin 0 -> 60 bytes tests/files/bad-1-lzma2-9.xz | Bin 72 -> 72 bytes 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 tests/files/bad-1-lzma2-10.xz diff --git a/tests/files/README b/tests/files/README index 18c4d583..1e14378a 100644 --- a/tests/files/README +++ b/tests/files/README @@ -246,6 +246,13 @@ properties in the third LZMA2 chunk. bad-1-lzma2-9.xz has LZMA2 stream that is truncated at the end of - a LZMA2 chunk and has no end marker. The uncompressed size of the - partial LZMA2 stream exceeds the value stored in the Block Header. + a LZMA2 chunk (no end marker). The uncompressed size of the partial + LZMA2 stream exceeds the value stored in the Block Header. + + bad-1-lzma2-10.xz has LZMA2 stream that, from point of view of a + LZMA2 decoder, extends past the end of Block (and even the end of + the file). Uncompressed Size in Block Header is bigger than the + invalid LZMA2 stream may produce (even if a decoder reads until + the end of the file). The Check type is None to nullify certain + simple size-based sanity checks in a Block decoder. diff --git a/tests/files/bad-1-lzma2-10.xz b/tests/files/bad-1-lzma2-10.xz new file mode 100644 index 0000000000000000000000000000000000000000..246515eaf5b43e63c1ee576136548d6f82e51495 GIT binary patch literal 60 zcmexsUKJ6=z`*cd=%ypn0RaO=Mh=E&S1V>P{{Qchnv;{y6`o&|lcLDQz$jyI>xRYy PwxW4ej6n4a43SX)k_Z$2 literal 0 HcmV?d00001 diff --git a/tests/files/bad-1-lzma2-9.xz b/tests/files/bad-1-lzma2-9.xz index cf191010b432f4d88d125c9d6cf191e38d3a91c9..0553905a0b5589bab4b5eb89455372dcb3dd7fef 100644 GIT binary patch delta 10 Rcmeb9n4rt_|NlgNNdOi~1SbFh delta 10 Rcmeb9n4rtVz%Wr?5&#WT0x19h