Fixed : ZBUFF_compressEnd() called multiple times with too small dst buffer (#206)

This commit is contained in:
Yann Collet
2016-06-21 13:11:48 +02:00
parent 2565971ea4
commit f15c1cb00c
2 changed files with 31 additions and 23 deletions
+2 -3
View File
@@ -427,10 +427,9 @@ static int fuzzerTests(U32 seed, U32 nbTests, unsigned startTest, double compres
size_t dstBuffSize = MIN(cBufferSize - cSize, randomDstSize);
remainingToFlush = ZBUFF_compressEnd(zc, cBuffer+cSize, &dstBuffSize);
CHECK (ZBUFF_isError(remainingToFlush), "flush error : %s", ZBUFF_getErrorName(remainingToFlush));
DISPLAY("flush %u bytes : still within context : %i \n", (U32)dstBuffSize, (int)remainingToFlush);
//DISPLAY("flush %u bytes : still within context : %i \n", (U32)dstBuffSize, (int)remainingToFlush);
cSize += dstBuffSize;
}
}
} }
crcOrig = XXH64_digest(&xxhState);
/* multi - fragments decompression test */