Fix sentinel size miscalculation
Since is_nul() style wild-comparing stride is U64, we must add sizeof(U64) to the sentinel.
This commit is contained in:
parent
eed7952101
commit
de5c930c90
@ -667,7 +667,7 @@ static unsigned long long decodeLZ4S(FILE* finput, FILE* foutput)
|
||||
inBuffSize = outBuffSize + 4;
|
||||
inBuff = (char*)malloc(inBuffSize);
|
||||
#if defined(LZ4IO_ENABLE_SPARSE_FILE)
|
||||
outBuff = (char*)malloc(outBuffSize+1);
|
||||
outBuff = (char*)malloc(outBuffSize+sizeof(U64));
|
||||
outBuff[outBuffSize] = 1; /* sentinel */
|
||||
#else /* LZ4IO_ENABLE_SPARSE_FILE */
|
||||
outBuff = (char*)malloc(outBuffSize);
|
||||
|
Loading…
Reference in New Issue
Block a user