fixed issue #49, reported by Hanno Böck (@hannob)
This commit is contained in:
parent
eeb8ba18d1
commit
fc60883d42
@ -602,6 +602,7 @@ static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
|
|||||||
|
|
||||||
/* get last non-null symbol weight (implied, total must be 2^n) */
|
/* get last non-null symbol weight (implied, total must be 2^n) */
|
||||||
tableLog = BIT_highbit32(weightTotal) + 1;
|
tableLog = BIT_highbit32(weightTotal) + 1;
|
||||||
|
if (tableLog > HUF_ABSOLUTEMAX_TABLELOG) return ERROR(corruption_detected);
|
||||||
{
|
{
|
||||||
U32 total = 1 << tableLog;
|
U32 total = 1 << tableLog;
|
||||||
U32 rest = total - weightTotal;
|
U32 rest = total - weightTotal;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user