]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
fuzz-ike: Initialize libcharon as logging will cause crashes otherwise devel
authorTobias Brunner <tobias@strongswan.org>
Fri, 6 Feb 2026 07:12:52 +0000 (08:12 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 6 Feb 2026 07:12:52 +0000 (08:12 +0100)
The bus.h header file redirects DBG* macros to the bus but that won't be
available unless libcharon is initialized.

fuzz/fuzz_ike.c

index 77010c1dded4916a9bf7ef689ba51070870c1c71..deb6074978e311cfce15ec2425e56597e61ce5b9 100644 (file)
@@ -14,6 +14,7 @@
  * for more details.
  */
 
+#include <daemon.h>
 #include <library.h>
 #include <encoding/message.h>
 
@@ -21,6 +22,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv)
 {
        dbg_default_set_level(-1);
        library_init(NULL, "fuzz_ike");
+       libcharon_init();
        return 0;
 }