Tighten std/bzip2 huffman_trees array size

This commit is contained in:
Nigel Tao committed 2022-06-10 14:02:17 +10:00
1 parent 5d7b113172
commit 8c33dd503b
9 files changed
+137 -30

No files matched your search

+13
View File
@@ -79,6 +79,11 @@ golden_test g_bzip2_bad_number_of_sections_gt = {
.src_filename = "test/data/artificial-bzip2/bad-number-of-sections.bz2",
};
golden_test g_bzip2_huffman_258_gt = {
.want_filename = "test/data/abraca.txt",
.src_filename = "test/data/artificial-bzip2/huffman-258.bz2",
};
golden_test g_bzip2_midsummer_gt = {
.want_filename = "test/data/midsummer.txt",
.src_filename = "test/data/midsummer.txt.bz2",
@@ -155,6 +160,13 @@ test_wuffs_bzip2_decode_bad_number_of_sections() {
return NULL;
}
const char* //
test_wuffs_bzip2_decode_huffman_258() {
CHECK_FOCUS(__func__);
return do_test_io_buffers(wuffs_bzip2_decode, &g_bzip2_huffman_258_gt,
UINT64_MAX, UINT64_MAX);
}
const char* //
test_wuffs_bzip2_decode_midsummer() {
CHECK_FOCUS(__func__);
@@ -246,6 +258,7 @@ proc g_tests[] = {
test_wuffs_bzip2_decode_256_bytes,
test_wuffs_bzip2_decode_bad_number_of_sections,
test_wuffs_bzip2_decode_huffman_258,
test_wuffs_bzip2_decode_interface,
test_wuffs_bzip2_decode_midsummer,
test_wuffs_bzip2_decode_pi,