mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
compression: Use correct value for nibble_index
Previously, we were setting this to the wrong value and overwriting existing output data. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
f8feac11cb
commit
7fab9f90e8
@ -151,10 +151,10 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
|
||||
match_len -= 7;
|
||||
|
||||
if (!nibble_index) {
|
||||
nibble_index = compressed_pos;
|
||||
nibble_index = compressed_pos + metadata_size;
|
||||
|
||||
__CHECK_BYTES(max_compressed_size, compressed_pos + metadata_size, sizeof(uint8_t));
|
||||
compressed[compressed_pos + metadata_size] = MIN(match_len, 15);
|
||||
compressed[nibble_index] = MIN(match_len, 15);
|
||||
metadata_size += sizeof(uint8_t);
|
||||
} else {
|
||||
__CHECK_BYTES(max_compressed_size, nibble_index, sizeof(uint8_t));
|
||||
|
@ -1,3 +1,2 @@
|
||||
samba4.local.compression.lzxpress4
|
||||
samba4.local.compression.lzxpress5
|
||||
samba4.local.compression.lzxpress6
|
||||
|
Loading…
x
Reference in New Issue
Block a user