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>
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));
-samba4.local.compression.lzxpress4
samba4.local.compression.lzxpress5
samba4.local.compression.lzxpress6