From c012e9540ae4d9d040928f418d2eef11ecab56a1 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Wed, 10 Oct 2018 17:33:04 -0700 Subject: [PATCH] removed one assert() that can be triggered by a corrupted bitstream. --- lib/common/bitstream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/bitstream.h b/lib/common/bitstream.h index faa0c2163..f8ec7efc9 100644 --- a/lib/common/bitstream.h +++ b/lib/common/bitstream.h @@ -340,7 +340,7 @@ MEM_STATIC size_t BIT_getUpperBits(size_t bitContainer, U32 const start) MEM_STATIC size_t BIT_getMiddleBits(size_t bitContainer, U32 const start, U32 const nbBits) { assert(nbBits < BIT_MASK_SIZE); - assert(start < sizeof(bitContainer)*8); + /* if start > bitMask, bitstream is corrupted, and result is undefined */ return (bitContainer >> start) & BIT_mask[nbBits]; } -- 2.47.2