From d46995efeb60bd73eb87388d95b2790ce98cb1e1 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Fri, 5 Nov 2021 14:09:49 -0700 Subject: [PATCH] Backport zstd patch from LKML Credit to Nathan Chancellor for the bug fix and Nick Desaulniers for the bug report. Link: https://github.com/ClangBuiltLinux/linux/issues/1486 Link: https://lore.kernel.org/all/20211021202353.2356400-1-nathan@kernel.org/ --- lib/decompress/huf_decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/decompress/huf_decompress.c b/lib/decompress/huf_decompress.c index 227f804a8..bfa72c345 100644 --- a/lib/decompress/huf_decompress.c +++ b/lib/decompress/huf_decompress.c @@ -1355,7 +1355,7 @@ HUF_decompress4X2_usingDTable_internal_body( HUF_DECODE_SYMBOLX2_0(op2, &bitD2); HUF_DECODE_SYMBOLX2_0(op3, &bitD3); HUF_DECODE_SYMBOLX2_0(op4, &bitD4); - endSignal = (U32)LIKELY( + endSignal = (U32)LIKELY((U32) (BIT_reloadDStreamFast(&bitD1) == BIT_DStream_unfinished) & (BIT_reloadDStreamFast(&bitD2) == BIT_DStream_unfinished) & (BIT_reloadDStreamFast(&bitD3) == BIT_DStream_unfinished) -- 2.47.2