grobian / carbon-c-relay

Enhanced C implementation of Carbon relay, aggregator and rewriter
Apache License 2.0
380 stars 107 forks source link

Do not feed LZ4F_decompress() with the already consumed data. #447

Closed lexx-bright closed 2 years ago

lexx-bright commented 2 years ago

Fix for the #440

Update strm->hdl.lz4.iloc even if LZ4F_decompress() writes nothing to the dstBuffer but consumes from the srcBuffer. Otherwise, the next run will fail with -16 ERROR_decompressionFailed because srcBuffer contains data consumed in the previous run.