1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/lib/compression
Douglas Bagnall 628f14c149 compression/huffman: double check distance in matches (CID 1517278)
Because we just wrote the intermediate representation to have no zero
distances, we can be sure it doesn't, but Coverity doesn't know. If
distance is zero, `bitlen_nonzero_16(distance)` would be bad.

   CID 1517278 (#1 of 1): Bad bit shift operation
   (BAD_SHIFT)41. large_shift: In expression 1 << code_dist, left
   shifting by more than 31 bits has undefined behavior. The shift
   amount, code_dist, is 65535.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
2022-12-19 22:32:35 +00:00
..
tests compression tests: avoid div by zero in failure (CID 1517297) 2022-12-19 22:32:35 +00:00
lzxpress_huffman.c compression/huffman: double check distance in matches (CID 1517278) 2022-12-19 22:32:35 +00:00
lzxpress_huffman.h lib/compression: LZ77 + Huffman compression 2022-12-01 22:56:39 +00:00
lzxpress.c lib/compression/lzxpress: fix our slow compression 2022-12-02 00:00:04 +00:00
lzxpress.h
wscript_build lib/comression: convert test_lzxpress_plain to cmocka 2022-12-01 22:56:39 +00:00