[fuzz] Only set HUF_repeat_valid if loaded table has all non-zero weights (#1898)
Fixes a fuzz issue where dictionary_round_trip failed because the compressor was generating corrupt files thanks to zero weights in the table. * Only setting loaded dict huf table to valid on non-zero * Adding hasNoZeroWeights test to fse tables * Forbiding nbBits != 0 when weight == 0 * Reverting the last commit * Setting table log to 0 when weight == 0 * Small (invalid) zero weight dict test * Small (valid) zero weight dict test * Initializing repeatMode vars to check before zero check * Removing FSE changes to seperate pr * Reverting accidentally changed file * Negating bool, using unsigned, optimization nit
显示
- lib/common/huf.h 1 个添加, 1 个删除lib/common/huf.h
- lib/compress/huf_compress.c 4 个添加, 2 个删除lib/compress/huf_compress.c
- lib/compress/zstd_compress.c 11 个添加, 3 个删除lib/compress/zstd_compress.c
- tests/dict-files/zero-weight-dict 0 个添加, 0 个删除tests/dict-files/zero-weight-dict
- tests/playTests.sh 16 个添加, 1 个删除tests/playTests.sh
加载中
想要评论请 注册 或 登录