From: Alan T. DeKok Date: Tue, 29 Oct 2019 18:29:50 +0000 (-0400) Subject: load internal dictionary, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=147e28a66313d8f44ea448ac9672f1df24983f77;p=thirdparty%2Ffreeradius-server.git load internal dictionary, too --- diff --git a/src/bin/fuzzer.c b/src/bin/fuzzer.c index d70b8c91462..e9ca57bcb0d 100644 --- a/src/bin/fuzzer.c +++ b/src/bin/fuzzer.c @@ -37,6 +37,7 @@ RCSID("$Id$") static bool init = false; static void *decode_ctx = NULL; static fr_test_point_proto_decode_t *tp = NULL; +static fr_dict_t *dict = NULL; int LLVMFuzzerInitialize(int *argc, char ***argv); int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len); @@ -57,6 +58,12 @@ int LLVMFuzzerInitialize(UNUSED int *argc, UNUSED char ***argv) return 0; } + if (fr_dict_internal_afrom_file(&dict, FR_DICTIONARY_INTERNAL_DIR) < 0) { + fprintf(stderr, "fuzzer: Failed initializing internal dictionary: %s\n", + fr_strerror()); + exit(1); + } + if (!proto) { fprintf(stderr, "Failed to find FR_LIBRARY_FUZZ_PROTOCOL\n"); exit(1);