Skip to content

Commit 7b5948c

Browse files
authored
Merge pull request facebook#426 from terrelln/fixes
Fix various {A, M}SAN bugs
2 parents 37d1300 + b2c39a2 commit 7b5948c

File tree

10 files changed

+121
-31
lines changed

10 files changed

+121
-31
lines changed

lib/common/entropy_common.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,11 @@ size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
168168
{
169169
U32 weightTotal;
170170
const BYTE* ip = (const BYTE*) src;
171-
size_t iSize = ip[0];
171+
size_t iSize;
172172
size_t oSize;
173173

174+
if (!srcSize) return ERROR(srcSize_wrong);
175+
iSize = ip[0];
174176
/* memset(huffWeight, 0, hwSize); *//* is not necessary, even though some analyzer complain ... */
175177

176178
if (iSize >= 128) { /* special header */
@@ -198,6 +200,7 @@ size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
198200
rankStats[huffWeight[n]]++;
199201
weightTotal += (1 << huffWeight[n]) >> 1;
200202
} }
203+
if (weightTotal == 0) return ERROR(corruption_detected);
201204

202205
/* get last non-null symbol weight (implied, total must be 2^n) */
203206
{ U32 const tableLog = BIT_highbit32(weightTotal) + 1;

lib/compress/zstd_compress.c

+37-4
Original file line numberDiff line numberDiff line change
@@ -2448,6 +2448,20 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_CCtx* zc, const void* src, size_t
24482448
}
24492449

24502450

2451+
/* Dictionaries that assign zero probability to symbols that show up causes problems
2452+
when FSE encoding. Refuse dictionaries that assign zero probability to symbols
2453+
that we may encounter during compression.
2454+
NOTE: This behavior is not standard and could be improved in the future. */
2455+
static size_t ZSTD_checkDictNCount(short* normalizedCounter, unsigned dictMaxSymbolValue, unsigned maxSymbolValue) {
2456+
U32 s;
2457+
if (dictMaxSymbolValue < maxSymbolValue) return ERROR(dictionary_corrupted);
2458+
for (s = 0; s <= maxSymbolValue; ++s) {
2459+
if (normalizedCounter[s] == 0) return ERROR(dictionary_corrupted);
2460+
}
2461+
return 0;
2462+
}
2463+
2464+
24512465
/* Dictionary format :
24522466
Magic == ZSTD_DICT_MAGIC (4 bytes)
24532467
HUF_writeCTable(256)
@@ -2464,32 +2478,41 @@ static size_t ZSTD_loadDictEntropyStats(ZSTD_CCtx* cctx, const void* dict, size_
24642478
{
24652479
const BYTE* dictPtr = (const BYTE*)dict;
24662480
const BYTE* const dictEnd = dictPtr + dictSize;
2481+
short offcodeNCount[MaxOff+1];
2482+
unsigned offcodeMaxValue = MaxOff;
24672483

24682484
{ size_t const hufHeaderSize = HUF_readCTable(cctx->hufTable, 255, dict, dictSize);
24692485
if (HUF_isError(hufHeaderSize)) return ERROR(dictionary_corrupted);
24702486
dictPtr += hufHeaderSize;
24712487
}
24722488

2473-
{ short offcodeNCount[MaxOff+1];
2474-
unsigned offcodeMaxValue = MaxOff, offcodeLog = OffFSELog;
2489+
{ unsigned offcodeLog;
24752490
size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, dictEnd-dictPtr);
24762491
if (FSE_isError(offcodeHeaderSize)) return ERROR(dictionary_corrupted);
2492+
if (offcodeLog > OffFSELog) return ERROR(dictionary_corrupted);
2493+
/* Defer checking offcodeMaxValue because we need to know the size of the dictionary content */
24772494
CHECK_E (FSE_buildCTable(cctx->offcodeCTable, offcodeNCount, offcodeMaxValue, offcodeLog), dictionary_corrupted);
24782495
dictPtr += offcodeHeaderSize;
24792496
}
24802497

24812498
{ short matchlengthNCount[MaxML+1];
2482-
unsigned matchlengthMaxValue = MaxML, matchlengthLog = MLFSELog;
2499+
unsigned matchlengthMaxValue = MaxML, matchlengthLog;
24832500
size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dictPtr, dictEnd-dictPtr);
24842501
if (FSE_isError(matchlengthHeaderSize)) return ERROR(dictionary_corrupted);
2502+
if (matchlengthLog > MLFSELog) return ERROR(dictionary_corrupted);
2503+
/* Every match length code must have non-zero probability */
2504+
CHECK_F (ZSTD_checkDictNCount(matchlengthNCount, matchlengthMaxValue, MaxML));
24852505
CHECK_E (FSE_buildCTable(cctx->matchlengthCTable, matchlengthNCount, matchlengthMaxValue, matchlengthLog), dictionary_corrupted);
24862506
dictPtr += matchlengthHeaderSize;
24872507
}
24882508

24892509
{ short litlengthNCount[MaxLL+1];
2490-
unsigned litlengthMaxValue = MaxLL, litlengthLog = LLFSELog;
2510+
unsigned litlengthMaxValue = MaxLL, litlengthLog;
24912511
size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dictPtr, dictEnd-dictPtr);
24922512
if (FSE_isError(litlengthHeaderSize)) return ERROR(dictionary_corrupted);
2513+
if (litlengthLog > LLFSELog) return ERROR(dictionary_corrupted);
2514+
/* Every literal length code must have non-zero probability */
2515+
CHECK_F (ZSTD_checkDictNCount(litlengthNCount, litlengthMaxValue, MaxLL));
24932516
CHECK_E(FSE_buildCTable(cctx->litlengthCTable, litlengthNCount, litlengthMaxValue, litlengthLog), dictionary_corrupted);
24942517
dictPtr += litlengthHeaderSize;
24952518
}
@@ -2500,6 +2523,16 @@ static size_t ZSTD_loadDictEntropyStats(ZSTD_CCtx* cctx, const void* dict, size_
25002523
cctx->rep[2] = MEM_readLE32(dictPtr+8); if (cctx->rep[2] >= dictSize) return ERROR(dictionary_corrupted);
25012524
dictPtr += 12;
25022525

2526+
{ U32 offcodeMax = MaxOff;
2527+
if ((size_t)(dictEnd - dictPtr) <= ((U32)-1) - 128 KB) {
2528+
U32 const maxOffset = (U32)(dictEnd - dictPtr) + 128 KB; /* The maximum offset that must be supported */
2529+
/* Calculate minimum offset code required to represent maxOffset */
2530+
offcodeMax = ZSTD_highbit32(maxOffset);
2531+
}
2532+
/* Every possible supported offset <= dictContentSize + 128 KB must be representable */
2533+
CHECK_F (ZSTD_checkDictNCount(offcodeNCount, offcodeMaxValue, MIN(offcodeMax, MaxOff)));
2534+
}
2535+
25032536
cctx->flagStaticTables = 1;
25042537
return dictPtr - (const BYTE*)dict;
25052538
}

lib/decompress/zstd_decompress.c

+11-5
Original file line numberDiff line numberDiff line change
@@ -712,10 +712,13 @@ size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr,
712712
{ int nbSeq = *ip++;
713713
if (!nbSeq) { *nbSeqPtr=0; return 1; }
714714
if (nbSeq > 0x7F) {
715-
if (nbSeq == 0xFF)
715+
if (nbSeq == 0xFF) {
716+
if (ip+2 > iend) return ERROR(srcSize_wrong);
716717
nbSeq = MEM_readLE16(ip) + LONGNBSEQ, ip+=2;
717-
else
718+
} else {
719+
if (ip >= iend) return ERROR(srcSize_wrong);
718720
nbSeq = ((nbSeq-0x80)<<8) + *ip++;
721+
}
719722
}
720723
*nbSeqPtr = nbSeq;
721724
}
@@ -1318,25 +1321,28 @@ static size_t ZSTD_loadEntropy(ZSTD_DCtx* dctx, const void* const dict, size_t c
13181321
}
13191322

13201323
{ short offcodeNCount[MaxOff+1];
1321-
U32 offcodeMaxValue=MaxOff, offcodeLog=OffFSELog;
1324+
U32 offcodeMaxValue=MaxOff, offcodeLog;
13221325
size_t const offcodeHeaderSize = FSE_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dictPtr, dictEnd-dictPtr);
13231326
if (FSE_isError(offcodeHeaderSize)) return ERROR(dictionary_corrupted);
1327+
if (offcodeLog > OffFSELog) return ERROR(dictionary_corrupted);
13241328
CHECK_E(FSE_buildDTable(dctx->OFTable, offcodeNCount, offcodeMaxValue, offcodeLog), dictionary_corrupted);
13251329
dictPtr += offcodeHeaderSize;
13261330
}
13271331

13281332
{ short matchlengthNCount[MaxML+1];
1329-
unsigned matchlengthMaxValue = MaxML, matchlengthLog = MLFSELog;
1333+
unsigned matchlengthMaxValue = MaxML, matchlengthLog;
13301334
size_t const matchlengthHeaderSize = FSE_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dictPtr, dictEnd-dictPtr);
13311335
if (FSE_isError(matchlengthHeaderSize)) return ERROR(dictionary_corrupted);
1336+
if (matchlengthLog > MLFSELog) return ERROR(dictionary_corrupted);
13321337
CHECK_E(FSE_buildDTable(dctx->MLTable, matchlengthNCount, matchlengthMaxValue, matchlengthLog), dictionary_corrupted);
13331338
dictPtr += matchlengthHeaderSize;
13341339
}
13351340

13361341
{ short litlengthNCount[MaxLL+1];
1337-
unsigned litlengthMaxValue = MaxLL, litlengthLog = LLFSELog;
1342+
unsigned litlengthMaxValue = MaxLL, litlengthLog;
13381343
size_t const litlengthHeaderSize = FSE_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dictPtr, dictEnd-dictPtr);
13391344
if (FSE_isError(litlengthHeaderSize)) return ERROR(dictionary_corrupted);
1345+
if (litlengthLog > LLFSELog) return ERROR(dictionary_corrupted);
13401346
CHECK_E(FSE_buildDTable(dctx->LLTable, litlengthNCount, litlengthMaxValue, litlengthLog), dictionary_corrupted);
13411347
dictPtr += litlengthHeaderSize;
13421348
}

lib/legacy/zstd_v01.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -958,13 +958,16 @@ static size_t HUF_readDTable (U16* DTable, const void* src, size_t srcSize)
958958
U32 weightTotal;
959959
U32 maxBits;
960960
const BYTE* ip = (const BYTE*) src;
961-
size_t iSize = ip[0];
961+
size_t iSize;
962962
size_t oSize;
963963
U32 n;
964964
U32 nextRankStart;
965965
void* ptr = DTable+1;
966966
HUF_DElt* const dt = (HUF_DElt*)ptr;
967967

968+
if (!srcSize) return (size_t)-FSE_ERROR_srcSize_wrong;
969+
iSize = ip[0];
970+
968971
FSE_STATIC_ASSERT(sizeof(HUF_DElt) == sizeof(U16)); /* if compilation fails here, assertion is false */
969972
//memset(huffWeight, 0, sizeof(huffWeight)); /* should not be necessary, but some analyzer complain ... */
970973
if (iSize >= 128) /* special header */
@@ -1005,6 +1008,7 @@ static size_t HUF_readDTable (U16* DTable, const void* src, size_t srcSize)
10051008
rankVal[huffWeight[n]]++;
10061009
weightTotal += (1 << huffWeight[n]) >> 1;
10071010
}
1011+
if (weightTotal == 0) return (size_t)-FSE_ERROR_corruptionDetected;
10081012

10091013
/* get last non-null symbol weight (implied, total must be 2^n) */
10101014
maxBits = FSE_highbit32(weightTotal) + 1;
@@ -1533,6 +1537,7 @@ size_t ZSTDv01_decodeLiteralsBlock(void* ctx,
15331537
{
15341538
size_t rleSize = litbp.origSize;
15351539
if (rleSize>maxDstSize) return ERROR(dstSize_tooSmall);
1540+
if (!srcSize) return ERROR(srcSize_wrong);
15361541
memset(oend - rleSize, *ip, rleSize);
15371542
*litStart = oend - rleSize;
15381543
*litSize = rleSize;

lib/legacy/zstd_v02.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -1607,10 +1607,12 @@ static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
16071607
U32 weightTotal;
16081608
U32 tableLog;
16091609
const BYTE* ip = (const BYTE*) src;
1610-
size_t iSize = ip[0];
1610+
size_t iSize;
16111611
size_t oSize;
16121612
U32 n;
16131613

1614+
if (!srcSize) return ERROR(srcSize_wrong);
1615+
iSize = ip[0];
16141616
//memset(huffWeight, 0, hwSize); /* is not necessary, even though some analyzer complain ... */
16151617

16161618
if (iSize >= 128) /* special header */
@@ -1652,6 +1654,7 @@ static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
16521654
rankStats[huffWeight[n]]++;
16531655
weightTotal += (1 << huffWeight[n]) >> 1;
16541656
}
1657+
if (weightTotal == 0) return ERROR(corruption_detected);
16551658

16561659
/* get last non-null symbol weight (implied, total must be 2^n) */
16571660
tableLog = BIT_highbit32(weightTotal) + 1;

lib/legacy/zstd_v03.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -1604,10 +1604,12 @@ static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
16041604
U32 weightTotal;
16051605
U32 tableLog;
16061606
const BYTE* ip = (const BYTE*) src;
1607-
size_t iSize = ip[0];
1607+
size_t iSize;
16081608
size_t oSize;
16091609
U32 n;
16101610

1611+
if (!srcSize) return ERROR(srcSize_wrong);
1612+
iSize = ip[0];
16111613
//memset(huffWeight, 0, hwSize); /* is not necessary, even though some analyzer complain ... */
16121614

16131615
if (iSize >= 128) /* special header */
@@ -1649,6 +1651,7 @@ static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
16491651
rankStats[huffWeight[n]]++;
16501652
weightTotal += (1 << huffWeight[n]) >> 1;
16511653
}
1654+
if (weightTotal == 0) return ERROR(corruption_detected);
16521655

16531656
/* get last non-null symbol weight (implied, total must be 2^n) */
16541657
tableLog = BIT_highbit32(weightTotal) + 1;

lib/legacy/zstd_v04.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -1896,10 +1896,12 @@ static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
18961896
U32 weightTotal;
18971897
U32 tableLog;
18981898
const BYTE* ip = (const BYTE*) src;
1899-
size_t iSize = ip[0];
1899+
size_t iSize;
19001900
size_t oSize;
19011901
U32 n;
19021902

1903+
if (!srcSize) return ERROR(srcSize_wrong);
1904+
iSize = ip[0];
19031905
//memset(huffWeight, 0, hwSize); /* is not necessary, even though some analyzer complain ... */
19041906

19051907
if (iSize >= 128) /* special header */
@@ -1941,6 +1943,7 @@ static size_t HUF_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
19411943
rankStats[huffWeight[n]]++;
19421944
weightTotal += (1 << huffWeight[n]) >> 1;
19431945
}
1946+
if (weightTotal == 0) return ERROR(corruption_detected);
19441947

19451948
/* get last non-null symbol weight (implied, total must be 2^n) */
19461949
tableLog = BIT_highbit32(weightTotal) + 1;

lib/legacy/zstd_v05.c

+20-5
Original file line numberDiff line numberDiff line change
@@ -1873,10 +1873,12 @@ static size_t HUFv05_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
18731873
U32 weightTotal;
18741874
U32 tableLog;
18751875
const BYTE* ip = (const BYTE*) src;
1876-
size_t iSize = ip[0];
1876+
size_t iSize;
18771877
size_t oSize;
18781878
U32 n;
18791879

1880+
if (!srcSize) return ERROR(srcSize_wrong);
1881+
iSize = ip[0];
18801882
//memset(huffWeight, 0, hwSize); /* is not necessary, even though some analyzer complain ... */
18811883

18821884
if (iSize >= 128) { /* special header */
@@ -1910,6 +1912,7 @@ static size_t HUFv05_readStats(BYTE* huffWeight, size_t hwSize, U32* rankStats,
19101912
rankStats[huffWeight[n]]++;
19111913
weightTotal += (1 << huffWeight[n]) >> 1;
19121914
}
1915+
if (weightTotal == 0) return ERROR(corruption_detected);
19131916

19141917
/* get last non-null symbol weight (implied, total must be 2^n) */
19151918
tableLog = BITv05_highbit32(weightTotal) + 1;
@@ -2943,6 +2946,7 @@ size_t ZSTDv05_decodeLiteralsBlock(ZSTDv05_DCtx* dctx,
29432946
{
29442947
size_t litSize, litCSize, singleStream=0;
29452948
U32 lhSize = ((istart[0]) >> 4) & 3;
2949+
if (srcSize < 5) return ERROR(corruption_detected); /* srcSize >= MIN_CBLOCK_SIZE == 3; here we need up to 5 for case 3 */
29462950
switch(lhSize)
29472951
{
29482952
case 0: case 1: default: /* note : default is impossible, since lhSize into [0..3] */
@@ -2966,6 +2970,7 @@ size_t ZSTDv05_decodeLiteralsBlock(ZSTDv05_DCtx* dctx,
29662970
break;
29672971
}
29682972
if (litSize > BLOCKSIZE) return ERROR(corruption_detected);
2973+
if (litCSize + lhSize > srcSize) return ERROR(corruption_detected);
29692974

29702975
if (HUFv05_isError(singleStream ?
29712976
HUFv05_decompress1X2(dctx->litBuffer, litSize, istart+lhSize, litCSize) :
@@ -2991,6 +2996,7 @@ size_t ZSTDv05_decodeLiteralsBlock(ZSTDv05_DCtx* dctx,
29912996
lhSize=3;
29922997
litSize = ((istart[0] & 15) << 6) + (istart[1] >> 2);
29932998
litCSize = ((istart[1] & 3) << 8) + istart[2];
2999+
if (litCSize + litSize > srcSize) return ERROR(corruption_detected);
29943000

29953001
errorCode = HUFv05_decompress1X4_usingDTable(dctx->litBuffer, litSize, istart+lhSize, litCSize, dctx->hufTableX4);
29963002
if (HUFv05_isError(errorCode)) return ERROR(corruption_detected);
@@ -3047,6 +3053,7 @@ size_t ZSTDv05_decodeLiteralsBlock(ZSTDv05_DCtx* dctx,
30473053
break;
30483054
case 3:
30493055
litSize = ((istart[0] & 15) << 16) + (istart[1] << 8) + istart[2];
3056+
if (srcSize<4) return ERROR(corruption_detected); /* srcSize >= MIN_CBLOCK_SIZE == 3; here we need lhSize+1 = 4 */
30503057
break;
30513058
}
30523059
if (litSize > BLOCKSIZE) return ERROR(corruption_detected);
@@ -3080,17 +3087,22 @@ size_t ZSTDv05_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumps
30803087
/* SeqHead */
30813088
*nbSeq = *ip++;
30823089
if (*nbSeq==0) return 1;
3083-
if (*nbSeq >= 128)
3090+
if (*nbSeq >= 128) {
3091+
if (ip >= iend) return ERROR(srcSize_wrong);
30843092
*nbSeq = ((nbSeq[0]-128)<<8) + *ip++;
3093+
}
30853094

3095+
if (ip >= iend) return ERROR(srcSize_wrong);
30863096
LLtype = *ip >> 6;
30873097
Offtype = (*ip >> 4) & 3;
30883098
MLtype = (*ip >> 2) & 3;
30893099
if (*ip & 2) {
3100+
if (ip+3 > iend) return ERROR(srcSize_wrong);
30903101
dumpsLength = ip[2];
30913102
dumpsLength += ip[1] << 8;
30923103
ip += 3;
30933104
} else {
3105+
if (ip+2 > iend) return ERROR(srcSize_wrong);
30943106
dumpsLength = ip[1];
30953107
dumpsLength += (ip[0] & 1) << 8;
30963108
ip += 2;
@@ -3669,11 +3681,11 @@ static size_t ZSTDv05_loadEntropy(ZSTDv05_DCtx* dctx, const void* dict, size_t d
36693681
{
36703682
size_t hSize, offcodeHeaderSize, matchlengthHeaderSize, errorCode, litlengthHeaderSize;
36713683
short offcodeNCount[MaxOff+1];
3672-
U32 offcodeMaxValue=MaxOff, offcodeLog=OffFSEv05Log;
3684+
U32 offcodeMaxValue=MaxOff, offcodeLog;
36733685
short matchlengthNCount[MaxML+1];
3674-
unsigned matchlengthMaxValue = MaxML, matchlengthLog = MLFSEv05Log;
3686+
unsigned matchlengthMaxValue = MaxML, matchlengthLog;
36753687
short litlengthNCount[MaxLL+1];
3676-
unsigned litlengthMaxValue = MaxLL, litlengthLog = LLFSEv05Log;
3688+
unsigned litlengthMaxValue = MaxLL, litlengthLog;
36773689

36783690
hSize = HUFv05_readDTableX4(dctx->hufTableX4, dict, dictSize);
36793691
if (HUFv05_isError(hSize)) return ERROR(dictionary_corrupted);
@@ -3682,19 +3694,22 @@ static size_t ZSTDv05_loadEntropy(ZSTDv05_DCtx* dctx, const void* dict, size_t d
36823694

36833695
offcodeHeaderSize = FSEv05_readNCount(offcodeNCount, &offcodeMaxValue, &offcodeLog, dict, dictSize);
36843696
if (FSEv05_isError(offcodeHeaderSize)) return ERROR(dictionary_corrupted);
3697+
if (offcodeLog > OffFSEv05Log) return ERROR(dictionary_corrupted);
36853698
errorCode = FSEv05_buildDTable(dctx->OffTable, offcodeNCount, offcodeMaxValue, offcodeLog);
36863699
if (FSEv05_isError(errorCode)) return ERROR(dictionary_corrupted);
36873700
dict = (const char*)dict + offcodeHeaderSize;
36883701
dictSize -= offcodeHeaderSize;
36893702

36903703
matchlengthHeaderSize = FSEv05_readNCount(matchlengthNCount, &matchlengthMaxValue, &matchlengthLog, dict, dictSize);
36913704
if (FSEv05_isError(matchlengthHeaderSize)) return ERROR(dictionary_corrupted);
3705+
if (matchlengthLog > MLFSEv05Log) return ERROR(dictionary_corrupted);
36923706
errorCode = FSEv05_buildDTable(dctx->MLTable, matchlengthNCount, matchlengthMaxValue, matchlengthLog);
36933707
if (FSEv05_isError(errorCode)) return ERROR(dictionary_corrupted);
36943708
dict = (const char*)dict + matchlengthHeaderSize;
36953709
dictSize -= matchlengthHeaderSize;
36963710

36973711
litlengthHeaderSize = FSEv05_readNCount(litlengthNCount, &litlengthMaxValue, &litlengthLog, dict, dictSize);
3712+
if (litlengthLog > LLFSEv05Log) return ERROR(dictionary_corrupted);
36983713
if (FSEv05_isError(litlengthHeaderSize)) return ERROR(dictionary_corrupted);
36993714
errorCode = FSEv05_buildDTable(dctx->LLTable, litlengthNCount, litlengthMaxValue, litlengthLog);
37003715
if (FSEv05_isError(errorCode)) return ERROR(dictionary_corrupted);

0 commit comments

Comments
 (0)