Lines Matching refs:targetSize

401             int const targetSize = srcSize * (int)((FUZ_rand(&randState) & 127)+1) >> 7;
403 compressedBuffer[targetSize] = endCheck;
404 cSize = LZ4_compress_destSize(block, compressedBuffer, &srcSize, targetSize);
405 FUZ_CHECKTEST(cSize > targetSize, "LZ4_compress_destSize() result larger than dst buffer !");
406 FUZ_CHECKTEST(compressedBuffer[targetSize] != endCheck, "LZ4_compress_destSize() overwrite dst buffer !");
408 DISPLAYLEVEL(5, "destSize : %7i/%7i; content%7i/%7i ", cSize, targetSize, srcSize, blockSize);
409 if (targetSize>0) {
430 int const targetSize = srcSize * (int)((FUZ_rand(&randState) & 127)+1) >> 7;
434 compressedBuffer[targetSize] = endCheck;
435 cSize = LZ4_compress_HC_destSize(ctx, block, compressedBuffer, &srcSize, targetSize, compressionLevel);
437 compressionLevel, cSize, targetSize, srcSize, blockSize);
439 FUZ_CHECKTEST(cSize > targetSize, "LZ4_compress_HC_destSize() result larger than dst buffer !");
440 FUZ_CHECKTEST(compressedBuffer[targetSize] != endCheck, "LZ4_compress_HC_destSize() overwrite dst buffer !");
442 if (targetSize>0) {
630 int const targetSize = (int)((size_t)blockSize - missingOutBytes);
633 char const sentinel = decodedBuffer[targetSize] = block[targetSize] ^ 0x5A;
634 int const decResult = LZ4_decompress_safe_partial(compressedBuffer, decodedBuffer, inCSize, targetSize, blockSize);
636 FUZ_CHECKTEST(decResult != targetSize, "LZ4_decompress_safe_partial did not regenerated required amount of data (%i < %i <= %i)", decResult, targetSize, blockSize);
637 FUZ_CHECKTEST(decodedBuffer[targetSize] != sentinel, "LZ4_decompress_safe_partial overwrite beyond requested size (though %i <= %i <= %i)", decResult, targetSize, blockSize);
638 FUZ_CHECKTEST(memcmp(block, decodedBuffer, (size_t)targetSize), "LZ4_decompress_safe_partial: corruption detected in regenerated data");
644 int const targetSize = (int)((size_t)blockSize - missingOutBytes);
647 char const sentinel = decodedBuffer[targetSize] = block[targetSize] ^ 0x5A;
648 int const decResult = LZ4_decompress_safe_partial_usingDict(compressedBuffer, decodedBuffer, inCSize, targetSize, blockSize, NULL, 0);
650 FUZ_CHECKTEST(decResult != targetSize, "LZ4_decompress_safe_partial_usingDict did not regenerated required amount of data (%i < %i <= %i)", decResult, targetSize, blockSize);
651 FUZ_CHECKTEST(decodedBuffer[targetSize] != sentinel, "LZ4_decompress_safe_partial_usingDict overwrite beyond requested size (though %i <= %i <= %i)", decResult, targetSize, blockSize);
652 FUZ_CHECKTEST(memcmp(block, decodedBuffer, (size_t)targetSize), "LZ4_decompress_safe_partial_usingDict: corruption detected in regenerated data");
657 int const targetSize = (int)((size_t)blockSize - missingOutBytes);
660 char const sentinel = decodedBuffer[targetSize] = block[targetSize] ^ 0x5A;
661 int const decResult = LZ4_decompress_safe_partial_usingDict(compressedBuffer, decodedBuffer, inCSize, targetSize, blockSize, decodedBuffer, dictSize);
663 FUZ_CHECKTEST(decResult != targetSize, "LZ4_decompress_safe_partial_usingDict did not regenerated required amount of data (%i < %i <= %i)", decResult, targetSize, blockSize);
664 FUZ_CHECKTEST(decodedBuffer[targetSize] != sentinel, "LZ4_decompress_safe_partial_usingDict overwrite beyond requested size (though %i <= %i <= %i)", decResult, targetSize, blockSize);
665 FUZ_CHECKTEST(memcmp(block, decodedBuffer, (size_t)targetSize), "LZ4_decompress_safe_partial_usingDict: corruption detected in regenerated data");
670 int const targetSize = (int)((size_t)blockSize - missingOutBytes);
673 char const sentinel = decodedBuffer[targetSize] = block[targetSize] ^ 0x5A;
674 int const decResult = LZ4_decompress_safe_partial_usingDict(compressedBuffer, decodedBuffer, inCSize, targetSize, blockSize, dict, dictSize);
676 FUZ_CHECKTEST(decResult != targetSize, "LZ4_decompress_safe_partial_usingDict did not regenerated required amount of data (%i < %i <= %i)", decResult, targetSize, blockSize);
677 FUZ_CHECKTEST(decodedBuffer[targetSize] != sentinel, "LZ4_decompress_safe_partial_usingDict overwrite beyond requested size (though %i <= %i <= %i)", decResult, targetSize, blockSize);
678 FUZ_CHECKTEST(memcmp(block, decodedBuffer, (size_t)targetSize), "LZ4_decompress_safe_partial_usingDict: corruption detected in regenerated data");
1355 size_t const targetSize = 4116; /* size carefully selected to trigger an overflow */
1357 void* const dstBlock = malloc(targetSize+1);
1363 ((char*)dstBlock)[targetSize] = sentinel;
1368 assert(targetSize < INT_MAX);
1369 result = LZ4_compress_HC_destSize(&sHC, (const char*)block, (char*)dstBlock, &srcSize, (int)targetSize, 3);
1373 srcSize, result, (int)targetSize);
1374 FUZ_CHECKTEST(((char*)dstBlock)[targetSize] != sentinel,