]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
load internal dictionary, too
authorAlan T. DeKok <aland@freeradius.org>
Tue, 29 Oct 2019 18:29:50 +0000 (14:29 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 29 Oct 2019 18:36:32 +0000 (14:36 -0400)
src/bin/fuzzer.c

index d70b8c91462a814ad2fd6c57ece948d3f0586c46..e9ca57bcb0de2394077bb0ece6ea26c740a38fe0 100644 (file)
@@ -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);