Merge remote-tracking branch 'origin/topic/awelzel/2540-fuzzer-zeekpath-builtin-plugins'

* origin/topic/awelzel/2540-fuzzer-zeekpath-builtin-plugins:
  fuzzer-setup: Update ZEEKPATH to align with DEFAULT_ZEEKPATH
This commit is contained in:
Tim Wojtulewicz 2022-11-04 09:15:57 -07:00
commit 2975468060
3 changed files with 13 additions and 2 deletions

10
CHANGES
View file

@ -1,3 +1,13 @@
5.2.0-dev.189 | 2022-11-04 09:15:57 -0700
* fuzzer-setup: Update ZEEKPATH to align with DEFAULT_ZEEKPATH (Arne Welzel, Corelight)
The util-config.h file uses @DEFAULT_ZEEKPATH@ which includes the
builtin-plugins directory. Do the same change for the fuzzers so
that scripts from builtin plugins can be found.
Fixes #2540
5.2.0-dev.186 | 2022-11-03 09:21:35 -0700
* Add a missing deletion in ZAM code (Tim Wojtulewicz, Corelight)

View file

@ -1 +1 @@
5.2.0-dev.186
5.2.0-dev.189

View file

@ -22,7 +22,8 @@ extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
auto fuzzer_dir = zeek::util::SafeDirname(fuzzer_path).result;
std::string fs = zeek::util::fmt("%s/%s", fuzzer_dir.data(), oss_fuzz_scripts);
auto p = fs.data();
auto oss_fuzz_zeekpath = zeek::util::fmt(".:%s:%s/policy:%s/site", p, p, p);
auto oss_fuzz_zeekpath = zeek::util::fmt(".:%s:%s/policy:%s/site:%s/builtin-plugins", p, p,
p, p);
if ( setenv("ZEEKPATH", oss_fuzz_zeekpath, true) == -1 )
abort();