summaryrefslogtreecommitdiffstats
path: root/ossfuzz/lz4_helpers.h
diff options
context:
space:
mode:
authorNick Terrell <terrelln@fb.com>2019-07-19 01:49:40 (GMT)
committerNick Terrell <terrelln@fb.com>2019-07-19 01:54:59 (GMT)
commitd28159c025829fc70a295b727e32f899a9e0c7c5 (patch)
tree5e178908dd7d63670366c78176b8621dba9d394c /ossfuzz/lz4_helpers.h
parentb487660309d4245eec87e3ada4712bc2a19df791 (diff)
downloadlz4-d28159c025829fc70a295b727e32f899a9e0c7c5.zip
lz4-d28159c025829fc70a295b727e32f899a9e0c7c5.tar.gz
lz4-d28159c025829fc70a295b727e32f899a9e0c7c5.tar.bz2
[fuzz] Add LZ4 frame fuzzers
* Round trip fuzzer * Compress fuzzer * Decompress fuzzer
Diffstat (limited to 'ossfuzz/lz4_helpers.h')
-rw-r--r--ossfuzz/lz4_helpers.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ossfuzz/lz4_helpers.h b/ossfuzz/lz4_helpers.h
new file mode 100644
index 0000000..c99fb01
--- /dev/null
+++ b/ossfuzz/lz4_helpers.h
@@ -0,0 +1,13 @@
+#ifndef LZ4_HELPERS
+#define LZ4_HELPERS
+
+#include "lz4frame.h"
+
+LZ4F_frameInfo_t FUZZ_randomFrameInfo(uint32_t* seed);
+
+LZ4F_preferences_t FUZZ_randomPreferences(uint32_t* seed);
+
+size_t FUZZ_decompressFrame(void* dst, const size_t dstCapacity,
+ const void* src, const size_t srcSize);
+
+#endif /* LZ4_HELPERS */