summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-04-19 20:04:59 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-04-19 20:05:06 +0200
commitbd70abd581fe4c7dd29eaa7e8c3e177178a53991 (patch)
treebe373c9558cbcf333e95b7cd37013c44e8fe1040
parent78dcd394003ad1fa2c82e7fb09c0d117f9d0ed98 (diff)
downloadgnutls-bd70abd581fe4c7dd29eaa7e8c3e177178a53991.tar.gz
fuzz: openpgp fuzzer always succeeds when no support is present [ci skip]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r--devel/fuzz/gnutls_openpgp_cert_parser_fuzzer.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/devel/fuzz/gnutls_openpgp_cert_parser_fuzzer.cc b/devel/fuzz/gnutls_openpgp_cert_parser_fuzzer.cc
index c4c46c903e..4e103ecfab 100644
--- a/devel/fuzz/gnutls_openpgp_cert_parser_fuzzer.cc
+++ b/devel/fuzz/gnutls_openpgp_cert_parser_fuzzer.cc
@@ -15,7 +15,6 @@
#
################################################################################
*/
-#include <config.h>
#include <assert.h>
#include <stdint.h>
@@ -24,7 +23,6 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
-#ifdef ENABLE_OPENPGP
gnutls_datum_t raw;
gnutls_datum_t out;
gnutls_openpgp_crt_t crt;
@@ -34,6 +32,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
raw.size = size;
ret = gnutls_openpgp_crt_init(&crt);
+ if (ret == GNUTLS_E_UNIMPLEMENTED_FEATURE)
+ return 0;
assert(ret >= 0);
ret = gnutls_openpgp_crt_import(crt, &raw, GNUTLS_OPENPGP_FMT_RAW);
@@ -44,6 +44,5 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
}
gnutls_openpgp_crt_deinit(crt);
-#endif
return 0;
}