zstd/lib/compress
Nick Terrell 396ef5b434 Fix & refactor Huffman repeat tables for dictionaries
The Huffman repeat mode checker assumed that the CTable was zeroed in the region `[maxSymbolValue + 1, 256)`.
This assumption didn't hold for tables built in the dictionaries, because it didn't go through the same codepath.

Since this code was originally written, we added a header to the CTable that specifies the `tableLog`.
Add `maxSymbolValue` to that header, and check that the table's `maxSymbolValue` is at least the block's `maxSymbolValue`.

This solution is cleaner because we write this header for every CTable we build, so it can't be missed in any code path.

Credit to OSS-Fuzz
2023-08-25 13:21:58 -04:00
..
clevels.h initial commit 2023-01-04 13:01:54 -08:00
fse_compress.c [fse] Delete unused functions 2023-01-27 13:15:07 -08:00
hist.c initial commit 2023-01-04 13:01:54 -08:00
hist.h initial commit 2023-01-04 13:01:54 -08:00
huf_compress.c Fix & refactor Huffman repeat tables for dictionaries 2023-08-25 13:21:58 -04:00
zstd_compress.c No longer reject dictionaries with literals maxSymbolValue < 255 2023-08-22 13:22:35 -04:00
zstd_compress_internal.h suppress false error message in LDM mode 2023-06-21 19:19:02 -07:00
zstd_compress_literals.c Replace Huffman boolean args with flags bit set 2023-01-20 14:12:53 -08:00
zstd_compress_literals.h fix root cause of #3416 2023-01-12 15:41:08 -08:00
zstd_compress_sequences.c initial commit 2023-01-04 13:01:54 -08:00
zstd_compress_sequences.h initial commit 2023-01-04 13:01:54 -08:00
zstd_compress_superblock.c fix a minor inefficiency in compress_superblock 2023-06-05 09:51:52 -07:00
zstd_compress_superblock.h initial commit 2023-01-04 13:01:54 -08:00
zstd_cwksp.h Unpoison Workspace Memory Before Freeing to Custom Free 2023-08-16 12:09:12 -04:00
zstd_double_fast.c Macro-Exclude Block Compressors from Declaration/Definition 2023-05-04 12:18:58 -04:00
zstd_double_fast.h Define Macros for Possibly-Present Functions; Use Them Rather than Ifdef Guards 2023-05-04 12:18:58 -04:00
zstd_fast.c initial commit 2023-01-04 13:01:54 -08:00
zstd_fast.h initial commit 2023-01-04 13:01:54 -08:00
zstd_lazy.c Reorder Definitions in zstd_lazy.c to Group Under Macro Guards 2023-05-22 12:37:03 -04:00
zstd_lazy.h Re-Order Lazy Declarations; Minimize ifndefs 2023-05-04 12:18:58 -04:00
zstd_ldm.c Remove blockCompressor NULL Checks 2023-05-04 12:18:58 -04:00
zstd_ldm.h initial commit 2023-01-04 13:01:54 -08:00
zstd_ldm_geartab.h initial commit 2023-01-04 13:01:54 -08:00
zstd_opt.c Reorder Definitions in zstd_opt.c to Group Under Macro Guards (Slightly) 2023-05-22 12:41:48 -04:00
zstd_opt.h Also Reorganize Zstd Opt Declarations 2023-05-04 12:18:58 -04:00
zstdmt_compress.c suppress false error message in LDM mode 2023-06-21 19:19:02 -07:00
zstdmt_compress.h initial commit 2023-01-04 13:01:54 -08:00