From f094f531441140f10fd461ba769f49d10f5cd581 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Mon, 14 Nov 2016 14:38:46 -0800 Subject: silence a minor msan warning --- lib/lz4.c | 1 + programs/lz4io.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/lz4.c b/lib/lz4.c index e6b70bc..ff141be 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -1168,6 +1168,7 @@ FORCE_INLINE int LZ4_decompress_generic( offset = LZ4_readLE16(ip); ip+=2; match = op - offset; if ((checkOffset) && (unlikely(match < lowLimit))) goto _output_error; /* Error : offset outside buffers */ + LZ4_write32(op, offset); /* costs ~1%; silence an msan warning when offset==0 */ /* get matchlength */ length = token & ML_MASK; diff --git a/programs/lz4io.c b/programs/lz4io.c index 00576c2..5a366a4 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -824,7 +824,8 @@ static unsigned long long LZ4IO_decompressLZ4F(dRess_t ress, FILE* srcFile, FILE /* Write Block */ if (decodedBytes) { - if (!g_testMode) storedSkips = LZ4IO_fwriteSparse(dstFile, ress.dstBuffer, decodedBytes, storedSkips); + if (!g_testMode) + storedSkips = LZ4IO_fwriteSparse(dstFile, ress.dstBuffer, decodedBytes, storedSkips); filesize += decodedBytes; DISPLAYUPDATE(2, "\rDecompressed : %u MB ", (unsigned)(filesize>>20)); } -- cgit v0.12