From e4a6cc9d65ed560d36f07e0dc7bdd85d2e091b45 Mon Sep 17 00:00:00 2001 From: TheVice Date: Thu, 21 Mar 2024 19:09:38 +0200 Subject: [PATCH] [lib/entropy_common] removed checking on error. Changed '&' to '&&' at the while loop condition. --- lib/entropy_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/entropy_common.c b/lib/entropy_common.c index 6b825af..420cfd7 100644 --- a/lib/entropy_common.c +++ b/lib/entropy_common.c @@ -58,7 +58,6 @@ size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* t memcpy(buffer, headerBuffer, hbSize); { size_t const countSize = FSE_readNCount(normalizedCounter, maxSVPtr, tableLogPtr, buffer, sizeof(buffer)); - if (FSE_isError(countSize)) return countSize; if (countSize > hbSize) return ERROR(corruption_detected); return countSize; } } @@ -76,7 +75,7 @@ size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* t threshold = 1<1) & (charnum<=*maxSVPtr)) { + while ((remaining>1) && (charnum<=*maxSVPtr)) { if (previous0) { unsigned n0 = charnum; while ((bitStream & 0xFFFF) == 0xFFFF) {