summaryrefslogtreecommitdiffstats
path: root/src/fuzzing
diff options
context:
space:
mode:
Diffstat (limited to 'src/fuzzing')
-rw-r--r--src/fuzzing/keyring.c13
-rw-r--r--src/fuzzing/keyring_kbx.c12
-rw-r--r--src/fuzzing/sigimport.c11
-rw-r--r--src/fuzzing/verify.c13
-rw-r--r--src/fuzzing/verify_detached.c19
5 files changed, 31 insertions, 37 deletions
diff --git a/src/fuzzing/keyring.c b/src/fuzzing/keyring.c
index bac4e13..ad16cd0 100644
--- a/src/fuzzing/keyring.c
+++ b/src/fuzzing/keyring.c
@@ -35,15 +35,14 @@ int
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
#endif
{
- rnp_input_t input = NULL;
- rnp_result_t ret = 0;
- rnp_ffi_t ffi = NULL;
+ rnp_input_t input = NULL;
+ rnp_ffi_t ffi = NULL;
- ret = rnp_input_from_memory(&input, data, size, false);
+ (void) rnp_input_from_memory(&input, data, size, false);
- ret = rnp_ffi_create(&ffi, "GPG", "GPG");
- ret =
- rnp_load_keys(ffi, "GPG", input, RNP_LOAD_SAVE_PUBLIC_KEYS | RNP_LOAD_SAVE_SECRET_KEYS);
+ (void) rnp_ffi_create(&ffi, "GPG", "GPG");
+ (void) rnp_load_keys(
+ ffi, "GPG", input, RNP_LOAD_SAVE_PUBLIC_KEYS | RNP_LOAD_SAVE_SECRET_KEYS);
rnp_input_destroy(input);
rnp_ffi_destroy(ffi);
diff --git a/src/fuzzing/keyring_kbx.c b/src/fuzzing/keyring_kbx.c
index 768e669..7c9ce60 100644
--- a/src/fuzzing/keyring_kbx.c
+++ b/src/fuzzing/keyring_kbx.c
@@ -35,14 +35,12 @@ int
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
#endif
{
- rnp_input_t input = NULL;
- rnp_result_t ret = 0;
- rnp_ffi_t ffi = NULL;
+ rnp_input_t input = NULL;
+ rnp_ffi_t ffi = NULL;
- ret = rnp_input_from_memory(&input, data, size, false);
-
- ret = rnp_ffi_create(&ffi, "KBX", "G10");
- ret = rnp_load_keys(ffi, "KBX", input, RNP_LOAD_SAVE_PUBLIC_KEYS);
+ (void) rnp_input_from_memory(&input, data, size, false);
+ (void) rnp_ffi_create(&ffi, "KBX", "G10");
+ (void) rnp_load_keys(ffi, "KBX", input, RNP_LOAD_SAVE_PUBLIC_KEYS);
rnp_input_destroy(input);
rnp_ffi_destroy(ffi);
diff --git a/src/fuzzing/sigimport.c b/src/fuzzing/sigimport.c
index 35adeb7..89bd01a 100644
--- a/src/fuzzing/sigimport.c
+++ b/src/fuzzing/sigimport.c
@@ -35,14 +35,13 @@ int
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
#endif
{
- rnp_input_t input = NULL;
- rnp_result_t ret = 0;
- rnp_ffi_t ffi = NULL;
+ rnp_input_t input = NULL;
+ rnp_ffi_t ffi = NULL;
- ret = rnp_input_from_memory(&input, data, size, false);
- ret = rnp_ffi_create(&ffi, "GPG", "GPG");
+ (void) rnp_input_from_memory(&input, data, size, false);
+ (void) rnp_ffi_create(&ffi, "GPG", "GPG");
char *results = NULL;
- ret = rnp_import_signatures(ffi, input, 0, &results);
+ (void) rnp_import_signatures(ffi, input, 0, &results);
rnp_buffer_destroy(results);
rnp_input_destroy(input);
rnp_ffi_destroy(ffi);
diff --git a/src/fuzzing/verify.c b/src/fuzzing/verify.c
index cd6c849..7dcfb01 100644
--- a/src/fuzzing/verify.c
+++ b/src/fuzzing/verify.c
@@ -39,16 +39,15 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
rnp_ffi_t ffi = NULL;
rnp_input_t input = NULL;
rnp_output_t output = NULL;
- rnp_result_t ret;
- ret = rnp_ffi_create(&ffi, "GPG", "GPG");
- ret = rnp_input_from_memory(&input, data, size, false);
- ret = rnp_output_to_null(&output);
+ (void) rnp_ffi_create(&ffi, "GPG", "GPG");
+ (void) rnp_input_from_memory(&input, data, size, false);
+ (void) rnp_output_to_null(&output);
rnp_op_verify_t op = NULL;
- ret = rnp_op_verify_create(&op, ffi, input, output);
- ret = rnp_op_verify_execute(op);
- ret = rnp_op_verify_destroy(op);
+ (void) rnp_op_verify_create(&op, ffi, input, output);
+ (void) rnp_op_verify_execute(op);
+ (void) rnp_op_verify_destroy(op);
rnp_input_destroy(input);
rnp_output_destroy(output);
diff --git a/src/fuzzing/verify_detached.c b/src/fuzzing/verify_detached.c
index 2afb59a..316e7a1 100644
--- a/src/fuzzing/verify_detached.c
+++ b/src/fuzzing/verify_detached.c
@@ -36,20 +36,19 @@ int
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
#endif
{
- rnp_ffi_t ffi = NULL;
- rnp_input_t input = NULL;
- rnp_input_t msg_input = NULL;
- rnp_result_t ret;
+ rnp_ffi_t ffi = NULL;
+ rnp_input_t input = NULL;
+ rnp_input_t msg_input = NULL;
- ret = rnp_ffi_create(&ffi, "GPG", "GPG");
- ret = rnp_input_from_memory(&input, data, size, false);
+ (void) rnp_ffi_create(&ffi, "GPG", "GPG");
+ (void) rnp_input_from_memory(&input, data, size, false);
const char *msg = "message";
- ret = rnp_input_from_memory(&msg_input, (const uint8_t *) msg, strlen(msg), true);
+ (void) rnp_input_from_memory(&msg_input, (const uint8_t *) msg, strlen(msg), true);
rnp_op_verify_t verify = NULL;
- ret = rnp_op_verify_detached_create(&verify, ffi, msg_input, input);
- ret = rnp_op_verify_execute(verify);
- ret = rnp_op_verify_destroy(verify);
+ (void) rnp_op_verify_detached_create(&verify, ffi, msg_input, input);
+ (void) rnp_op_verify_execute(verify);
+ (void) rnp_op_verify_destroy(verify);
rnp_input_destroy(input);
rnp_input_destroy(msg_input);