diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2022-08-15 22:45:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 22:45:31 (GMT) |
commit | 5ff839680134437dbf4678f3d0c7b371d84f4964 (patch) | |
tree | 939d919c3903b42ed637542a4799fb3f4fa8b5fc /ossfuzz/decompress_fuzzer.c | |
parent | 416bc96faca629abcef42e56ecd2e20d26b79934 (diff) | |
parent | cfd6ab32522280079c2e6d3ea995f172b9ae0312 (diff) | |
download | lz4-5ff839680134437dbf4678f3d0c7b371d84f4964.zip lz4-5ff839680134437dbf4678f3d0c7b371d84f4964.tar.gz lz4-5ff839680134437dbf4678f3d0c7b371d84f4964.tar.bz2 |
stage v1.9.4
Diffstat (limited to 'ossfuzz/decompress_fuzzer.c')
-rw-r--r-- | ossfuzz/decompress_fuzzer.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/ossfuzz/decompress_fuzzer.c b/ossfuzz/decompress_fuzzer.c index 6f48e30..490b3fd 100644 --- a/ossfuzz/decompress_fuzzer.c +++ b/ossfuzz/decompress_fuzzer.c @@ -39,7 +39,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) /* No dictionary. */ LZ4_decompress_safe_usingDict((char const*)data, dst, size, dstCapacity, NULL, 0); - /* Small external dictonary. */ + /* Small external dictionary. */ LZ4_decompress_safe_usingDict((char const*)data, dst, size, dstCapacity, smallDict, smallDictSize); /* Large external dictionary. */ @@ -49,11 +49,27 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) LZ4_decompress_safe_usingDict((char const*)dataAfterDict, dst, size, dstCapacity, smallDict, smallDictSize); /* Large prefix. */ - LZ4_decompress_safe_usingDict((char const*)data, dst, size, + LZ4_decompress_safe_usingDict((char const*)dataAfterDict, dst, size, dstCapacity, largeDict, largeDictSize); /* Partial decompression. */ LZ4_decompress_safe_partial((char const*)data, dst, size, dstCapacity, dstCapacity); + /* Partial decompression using each possible dictionary configuration. */ + /* Partial decompression with no dictionary. */ + LZ4_decompress_safe_partial_usingDict((char const*)data, dst, size, + dstCapacity, dstCapacity, NULL, 0); + /* Partial decompression with small external dictionary. */ + LZ4_decompress_safe_partial_usingDict((char const*)data, dst, size, + dstCapacity, dstCapacity, smallDict, smallDictSize); + /* Partial decompression with large external dictionary. */ + LZ4_decompress_safe_partial_usingDict((char const*)data, dst, size, + dstCapacity, dstCapacity, largeDict, largeDictSize); + /* Partial decompression with small prefix. */ + LZ4_decompress_safe_partial_usingDict((char const*)dataAfterDict, dst, size, + dstCapacity, dstCapacity, smallDict, smallDictSize); + /* Partial decompression wtih large prefix. */ + LZ4_decompress_safe_partial_usingDict((char const*)dataAfterDict, dst, size, + dstCapacity, dstCapacity, largeDict, largeDictSize); free(dst); free(dict); FUZZ_dataProducer_free(producer); |