summaryrefslogtreecommitdiffstats
path: root/ossfuzz
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2020-09-29 05:37:20 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2020-09-30 00:09:58 (GMT)
commit392809d66e6c98a7c8653a2a32f6843af0f4306a (patch)
tree7fa07658ee0a800faeb531bc29110ff69a9dd6cd /ossfuzz
parent78f4fdbb89e71325cedc751e1f7c2403bb43c3f4 (diff)
downloadlz4-392809d66e6c98a7c8653a2a32f6843af0f4306a.zip
lz4-392809d66e6c98a7c8653a2a32f6843af0f4306a.tar.gz
lz4-392809d66e6c98a7c8653a2a32f6843af0f4306a.tar.bz2
fix minor static analyzer warnings
detected by scan-build and cppcheck fix #786
Diffstat (limited to 'ossfuzz')
-rw-r--r--ossfuzz/compress_frame_fuzzer.c4
-rw-r--r--ossfuzz/fuzz_data_producer.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/ossfuzz/compress_frame_fuzzer.c b/ossfuzz/compress_frame_fuzzer.c
index bb14fc2..568ae14 100644
--- a/ossfuzz/compress_frame_fuzzer.c
+++ b/ossfuzz/compress_frame_fuzzer.c
@@ -28,8 +28,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
char* const dst = (char*)malloc(dstCapacity);
char* const rt = (char*)malloc(size);
- FUZZ_ASSERT(dst);
- FUZZ_ASSERT(rt);
+ FUZZ_ASSERT(dst!=NULL);
+ FUZZ_ASSERT(rt!=NULL);
/* If compression succeeds it must round trip correctly. */
size_t const dstSize =
diff --git a/ossfuzz/fuzz_data_producer.c b/ossfuzz/fuzz_data_producer.c
index cc06958..670fbf5 100644
--- a/ossfuzz/fuzz_data_producer.c
+++ b/ossfuzz/fuzz_data_producer.c
@@ -5,8 +5,8 @@ struct FUZZ_dataProducer_s{
size_t size;
};
-FUZZ_dataProducer_t *FUZZ_dataProducer_create(const uint8_t *data, size_t size) {
- FUZZ_dataProducer_t *producer = malloc(sizeof(FUZZ_dataProducer_t));
+FUZZ_dataProducer_t* FUZZ_dataProducer_create(const uint8_t* data, size_t size) {
+ FUZZ_dataProducer_t* const producer = malloc(sizeof(FUZZ_dataProducer_t));
FUZZ_ASSERT(producer != NULL);