summaryrefslogtreecommitdiffstats
path: root/tests/fuzzer.c
Commit message (Collapse)AuthorAgeFilesLines
* Suppress false positive warning from MSVC (fuzzer.c)Takayuki Matsuoka2022-08-121-2/+10
| | | | | | | Suppress the following false positive warnings from MSVC: - Disable all arithmetic overflow (C26451) - Suppress C6385: Reading invalid data from 'compressedBuffer'. - Add ULL suffix to unsigned 64-bits constants.
* tests: add tests for `LZ4_decompress_safe_partial_usingDict`Qi Wang2022-06-071-0/+40
| | | | Signed-off-by: Qi Wang <wangqi@linux.alibaba.com>
* fix strange printf formatting warningYann Collet2020-12-011-10/+11
| | | | so now, `%p` _requires_ a `void*` pointer ?
* updated license & header datesYann Collet2020-11-251-1/+1
|
* better visual conformanceYann Collet2020-11-151-9/+11
| | | | | | only include <intrin.h> on vs2005+ (#947) remove some useless #pragma fix a few minor Visual warnings
* attempt at silencing cppcheckYann Collet2020-11-091-12/+12
|
* added similar tests for LZ4_saveDict()Yann Collet2020-11-081-1/+17
| | | | fast (non-HC) variant
* fix #926Yann Collet2020-11-081-2/+18
| | | | | fix incorrect behavior of LZ4_saveDictHC() when invoked right after initialization.
* unified alignment testYann Collet2020-11-061-28/+46
| | | | across lz4.c and lz4hc.c
* fix minor explicit castYann Collet2020-10-311-1/+1
|
* reduce new test stack usageYann Collet2020-10-031-10/+12
| | | | use heap instead
* fix cppcheck unused variable warningYann Collet2020-10-021-0/+1
|
* added LZ4_streamHC_t init testYann Collet2020-10-021-2/+21
| | | | which includes an alignment test
* Merge pull request #923 from lz4/fix784Yann Collet2020-09-281-15/+101
|\ | | | | fix efficiency of LZ4_compress_HC_destSize()
| * ensure last match not too close to endYann Collet2020-09-281-6/+8
| | | | | | | | must respect MFLIMIT distance from oend
| * fix incorrect countingYann Collet2020-09-281-1/+1
| | | | | | | | after truncation of last sequence
| * fix efficiency of LZ4_compress_HC_destSize()Yann Collet2020-09-281-9/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | LZ4_compress_HC_destSize() had a tendency to discard its last match when this match overflowed specified dstBuffer limit. The impact is generally moderate, but occasionally huge, typically when this last match is very large (such as compressing a bunch of zeroes). Issue #784 fixed for both Chain and Opt implementations. Added a unit test suggested by @remittor checking this topic.
* | fix compressing into NULLYann Collet2020-09-261-4/+13
|/ | | | | fails properly bug discovered by oss-fuzz
* fix #847Yann Collet2020-09-151-2/+5
| | | | | support NULL input without triggering undefined sanitizer
* added test triggering NULL arithmetic with usanYann Collet2020-09-151-0/+8
| | | | described in #847
* fixed minor pre-existing printf formattingYann Collet2020-08-271-2/+2
| | | | different signedness
* fixed strict c90 supportYann Collet2020-08-271-2/+0
|
* fix #783Yann Collet2020-08-271-4/+4
| | | | | | | | | | | | | | | | | LZ4_decompress_safe_partial() now also supports a scenario where nb_bytes_to_generate is <= block_decompressed_size And nb_bytes_to_read is >= block_compressed_size. Previously, the only supported scenario was nb_bytes_to_read == block_compress_size. Pay attention that, if nb_bytes_to_read is > block_compressed_size, then, necessarily, it requires that nb_bytes_to_generate is <= block_decompress_size. If both are larger, it will generate corrupted data.
* added test decompress-partial with extraneous input bytesYann Collet2020-08-121-9/+18
| | | | | fails currently, for investigation of #783
* Remove dirty Field From LZ4_stream_tW. Felix Handte2020-08-061-4/+0
|
* fix minor cppcheck warningsYann Collet2019-06-301-2/+2
|
* frametest: added LZ4F decoder noise testYann Collet2019-06-301-6/+6
|
* travisCI: added ASAN fuzzer testsYann Collet2019-06-291-3/+3
| | | | and fixed minor formatting warnings
* moved noisy-src decoder test into cBuffer_exactYann Collet2019-06-291-34/+34
| | | | | so that it can also catch any potential read out-of-bound in the input buffer (none reported so far, just a precaution for the future).
* fuzzer: added test to catch #738Yann Collet2019-06-291-51/+90
|
* added test case for in-place decompressionYann Collet2019-05-301-32/+63
| | | | worst case, designed to make the decoder overwrite into input
* fuzzer: changed internal buffer sizeYann Collet2019-05-291-9/+10
| | | | to ensure no overflow during unit tests
* one more conversion warningYann Collet2019-05-291-1/+1
|
* some more minor conversion warnings fixesYann Collet2019-05-291-5/+5
|
* fixed minor conversion warningYann Collet2019-05-291-1/+1
|
* added comments and macros for in-place (de)compressionYann Collet2019-05-291-2/+1
|
* added test case for in-place compressionYann Collet2019-05-291-16/+41
|
* fixed read-after input in LZ4_decompress_safe()Yann Collet2019-04-191-74/+82
|
* fuzzer : reduced stack usageYann Collet2019-04-191-18/+18
|
* fuzzer: reduce stack usage to please Visual static analyzerYann Collet2019-04-191-58/+66
|
* address a few minor Visual warningsYann Collet2019-04-181-2/+2
| | | | and created target cxx17build
* fix several minor static analyzer warningsYann Collet2019-04-181-27/+37
|
* fuzzer: fixed scan-build leak warningYann Collet2019-04-181-19/+10
| | | | | the program exit(), so there is no need to track and dealloc every buffer.
* fuzzer: fix explicit cast for C++Yann Collet2019-04-171-1/+1
|
* fuzzer: added tests to detect LZ4_decompress_fast() out of bound readYann Collet2019-04-171-19/+27
|
* Fix AIX errors/warningsNorm Green2019-04-171-0/+4
|
* fix fuzzer tests on dirty contextYann Collet2019-04-151-3/+3
| | | | | | context is no longer dirty after a failed compressed block. Actually, all indexes are fine. It remains compatible with continued streaming, and reset*_fast().
* and even more visual conversion warningsYann Collet2019-04-131-9/+11
|
* fixed loadDictHCYann Collet2019-04-091-4/+4
| | | | | by making a full initialization instead of a fast reset.
* modified LZ4_initStreamHC() to look like LZ4_initStream()Yann Collet2019-04-091-19/+20
| | | | | it is now a pure initializer, for statically allocated states. It can initialize any memory area, and because of this, requires size.