aboutsummaryrefslogtreecommitdiffstats
path: root/librecrypt_chain_length.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--librecrypt_chain_length.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/librecrypt_chain_length.c b/librecrypt_chain_length.c
index e43aaf9..364186a 100644
--- a/librecrypt_chain_length.c
+++ b/librecrypt_chain_length.c
@@ -7,6 +7,7 @@ extern inline size_t librecrypt_chain_length(const char *hash);
#else
+# ifndef FUZZ
int
@@ -29,4 +30,20 @@ main(void)
}
+# else
+
+
+extern volatile size_t discarded_return_value;
+volatile size_t discarded_return_value;
+
+int
+LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
+{
+ (void) size;
+ discarded_return_value = librecrypt_chain_length((const void *)data);
+ return 0;
+}
+
+
+# endif
#endif