From 6e27b1098a28f4ce09bfa6df68ad94182dfc2936 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Thu, 24 Jan 2008 00:46:05 +0200 Subject: [PATCH] Added bunch of test files containing Multi-Block Streams. --- tests/files/README | 53 ++++++++++++++++++++++++++++++ tests/files/bad-multi-none-1.lzma | Bin 0 -> 54 bytes tests/files/bad-multi-none-2.lzma | Bin 0 -> 53 bytes tests/files/bad-multi-none-3.lzma | Bin 0 -> 53 bytes tests/files/bad-multi-none-extra_1.lzma | Bin 0 -> 54 bytes tests/files/bad-multi-none-extra_2.lzma | Bin 0 -> 54 bytes tests/files/bad-multi-none-extra_3.lzma | Bin 0 -> 55 bytes tests/files/bad-multi-none-header_1.lzma | Bin 0 -> 57 bytes tests/files/bad-multi-none-index_1.lzma | Bin 0 -> 51 bytes tests/files/bad-multi-none-index_2.lzma | Bin 0 -> 49 bytes tests/files/bad-multi-none-index_3.lzma | Bin 0 -> 51 bytes tests/files/bad-multi-none-index_4.lzma | Bin 0 -> 51 bytes tests/files/good-multi-none-1.lzma | Bin 0 -> 75 bytes tests/files/good-multi-none-2.lzma | Bin 0 -> 53 bytes tests/files/good-multi-none-extra_1.lzma | Bin 0 -> 51 bytes tests/files/good-multi-none-extra_2.lzma | Bin 0 -> 79 bytes tests/files/good-multi-none-extra_3.lzma | Bin 0 -> 55 bytes tests/files/good-multi-none-header_1.lzma | Bin 0 -> 58 bytes tests/files/good-multi-none-header_2.lzma | Bin 0 -> 66 bytes 19 files changed, 53 insertions(+) create mode 100644 tests/files/bad-multi-none-1.lzma create mode 100644 tests/files/bad-multi-none-2.lzma create mode 100644 tests/files/bad-multi-none-3.lzma create mode 100644 tests/files/bad-multi-none-extra_1.lzma create mode 100644 tests/files/bad-multi-none-extra_2.lzma create mode 100644 tests/files/bad-multi-none-extra_3.lzma create mode 100644 tests/files/bad-multi-none-header_1.lzma create mode 100644 tests/files/bad-multi-none-index_1.lzma create mode 100644 tests/files/bad-multi-none-index_2.lzma create mode 100644 tests/files/bad-multi-none-index_3.lzma create mode 100644 tests/files/bad-multi-none-index_4.lzma create mode 100644 tests/files/good-multi-none-1.lzma create mode 100644 tests/files/good-multi-none-2.lzma create mode 100644 tests/files/good-multi-none-extra_1.lzma create mode 100644 tests/files/good-multi-none-extra_2.lzma create mode 100644 tests/files/good-multi-none-extra_3.lzma create mode 100644 tests/files/good-multi-none-header_1.lzma create mode 100644 tests/files/good-multi-none-header_2.lzma diff --git a/tests/files/README b/tests/files/README index 1f47c3c..4cabf87 100644 --- a/tests/files/README +++ b/tests/files/README @@ -76,6 +76,27 @@ good-single-lzma-flush_2.lzma has a flush marker in the middle of the file and just before EOPM. + good-multi-none-1.lzma is a basic Multi-Block Stream with two Data + Blocks and Footer Metadata Block. + + good-multi-none-2.lzma is good-multi-none-1.lzma with Total Size and + Uncompressed Size added to the Footer Metadata Block. + + good-multi-none-extra_1.lzma has the `Extra is present' flag set but + no actual Extra Records. + + good-multi-none-extra_2.lzma has two non-empty Extra Records. + + good-multi-none-extra_3.lzma has an Extra Record that has empty Data. + + good-multi-none-header_1.lzma has very minimal Header Metadata Block + with only the Metadata Flags field. + + good-multi-none-header_2.lzma has all information in both Header and + Footer Metadata Blocks. The Size of Header Metadata Block has wrong + value in Header Metadata Block, but this value must be ignored by + the decoder in case of Header Metadata Block. + 2.2. Bad Files @@ -132,6 +153,38 @@ bad-single-lzma-flush_twice.lzma has two flush markers with no data between them. + bad-multi-none-1.lzma has data after the last field in the Metadata + Block and the `Extra is present' flag is not set. + + bad-multi-none-2.lzma has wrong Total Size in Footer Metadata Block. + + bad-multi-none-3.lzma has wrong Uncompressed Size in Footer Metadata + Block. + + bad-multi-none-index_1.lzma has wrong value in the Number of Data + Blocks field. + + bad-multi-none-index_2.lzma has too short Metadata to contain all + the Index Records. + + bad-multi-none-index_3.lzma has wrong value in Total Size field in + the Index. + + bad-multi-none-index_4.lzma has wrong value in Uncompressed Size field + in the Index. + + bad-multi-none-extra_1.lzma has incomplete Extra Record at the end of + the Metadata Block. + + bad-multi-none-extra_2.lzma has incomplete variable-length integer as + Extra Record ID. + + bad-multi-none-extra_3.lzma has incomplete Extra Record at the end of + the Metadata Block. + + bad-multi-none-header_1.lzma has empty Header Metadata Block (even + the Metadata Flags field is not present). + 2.3. Malicious Files diff --git a/tests/files/bad-multi-none-1.lzma b/tests/files/bad-multi-none-1.lzma new file mode 100644 index 0000000000000000000000000000000000000000..208e510052c29b56e37fe5f364c5920c4850680a GIT binary patch literal 54 zcmezG6Xom3An@}4*7F<;stgPa9;rDw`CI}V3~E45cz#h%iXxZ50tQY#XE)PS7u{Gyx`MJ|B_44nMT(!5N( Ld~EDI0+CSw)a?w| literal 0 HcmV?d00001 diff --git a/tests/files/bad-multi-none-index_1.lzma b/tests/files/bad-multi-none-index_1.lzma new file mode 100644 index 0000000000000000000000000000000000000000..b1bd0ceebeb385fc685b59927c780c69d7d158fe GIT binary patch literal 51 zcmezG6Xom3An@}4*7F<;stgPa9;rDw`CI}V3~E45cz#h%iXxZ50tPk?W?nuvc20rF FC;)?~3;_TD literal 0 HcmV?d00001 diff --git a/tests/files/bad-multi-none-index_2.lzma b/tests/files/bad-multi-none-index_2.lzma new file mode 100644 index 0000000000000000000000000000000000000000..59d92c6cf51a3d31ee3413de5b5c405fde3a7f28 GIT binary patch literal 49 zcmezG6Xom3An@}4*7F<;stgPa9;rDw`CI}V3~E45cz#h%iXxZ50tOZiCSE>vfygKT DZ14;3 literal 0 HcmV?d00001 diff --git a/tests/files/bad-multi-none-index_3.lzma b/tests/files/bad-multi-none-index_3.lzma new file mode 100644 index 0000000000000000000000000000000000000000..5b94972a109bb177ddb600fedbed1052ad0e1a40 GIT binary patch literal 51 zcmezG6Xom3An@}4*7F<;stgPa9;rDw`CI}V3~E45cz#h%iXxZ50tPk?CSHCvc20rF FC;)?|3;_TD literal 0 HcmV?d00001 diff --git a/tests/files/bad-multi-none-index_4.lzma b/tests/files/bad-multi-none-index_4.lzma new file mode 100644 index 0000000000000000000000000000000000000000..880878a5e1fe35bd0647fc12ab91d36340a42bef GIT binary patch literal 51 zcmezG6Xom3An@}4*7F<;stgPa9;rDw`CI}V3~E45cz#h%iXxZ50tPk?CSE=^Hco-a FC;)?+3;zHB literal 0 HcmV?d00001 diff --git a/tests/files/good-multi-none-1.lzma b/tests/files/good-multi-none-1.lzma new file mode 100644 index 0000000000000000000000000000000000000000..53c6afaad4d6a75cb3f37e560326d49dd721e2b2 GIT binary patch literal 75 zcmezG6Xom3AnEI#xs8M2`wWIoRR#tIkJOx;d@cbo(`kkfK{cRYcz#h%iXxZ5-HWG! a7cj87D@L8?U=kH$V}D}BJV8)0G711z%@x1^ literal 0 HcmV?d00001 diff --git a/tests/files/good-multi-none-2.lzma b/tests/files/good-multi-none-2.lzma new file mode 100644 index 0000000000000000000000000000000000000000..bef06817b43d7d05ae7f41b24d559ff46134c8f3 GIT binary patch literal 53 zcmezG6Xom3An@}4*7F<;stgPa9;rDw`CI}V3~E45cz#h%iXxZ50tOB~XlfygKTcVreG literal 0 HcmV?d00001 diff --git a/tests/files/good-multi-none-extra_3.lzma b/tests/files/good-multi-none-extra_3.lzma new file mode 100644 index 0000000000000000000000000000000000000000..6e35306a327bde3048fac3994da1e77608dde657 GIT binary patch literal 55 zcmezG6Xom3An@}4*7F<;stgPa9;rDw`CI}V3~E45cz#h%iXxZ50tT)=X4C;++047mUR literal 0 HcmV?d00001 diff --git a/tests/files/good-multi-none-header_1.lzma b/tests/files/good-multi-none-header_1.lzma new file mode 100644 index 0000000000000000000000000000000000000000..169b5c90d983937b46bea83f2ed535e9e034d9d3 GIT binary patch literal 58 zcmezG6Xom3An@}4*7FM(7#TPiR2di;JW_LV^0@>!7}S8A@cg2j6h$t91q_`0EYiG8 MynJlzJOYtX0NZv9+5i9m literal 0 HcmV?d00001 diff --git a/tests/files/good-multi-none-header_2.lzma b/tests/files/good-multi-none-header_2.lzma new file mode 100644 index 0000000000000000000000000000000000000000..9bec4ff5d8889177905831ca436db4e2b31a75b4 GIT binary patch literal 66 zcmezG6Xom3An@}4*7FM(IQc`Rd6{_m*w{H3R2di;JW_LV^0@>!7}S8A@cg2j6h$rp NkTM>qG9H1*C;&5D4WIx3 literal 0 HcmV?d00001 -- 2.7.4