]> git.ipfire.org Git - thirdparty/zstd.git/commit
[FSE] Fix division by zero
authorNick Terrell <terrelln@fb.com>
Sat, 28 Jul 2018 00:30:03 +0000 (17:30 -0700)
committerNick Terrell <terrelln@fb.com>
Sat, 28 Jul 2018 00:30:03 +0000 (17:30 -0700)
commit9889bca530a2b52615eb1cd06260e9cd0c29e001
tree747c0dde8c8b59a8f32b4f9857bcecacc108f7a0
parent3abfbee215ed71a3ad303a3c60b0765194700afb
[FSE] Fix division by zero

When the primary normalization method fails, and
`(1 << tableLog) == (maxSymbolValue + 1)`, and every symbol gets assigned
normalized weight 1 or -1 in the first loop, then the next division can
raise `SIGFPE`.
lib/compress/fse_compress.c