Files
clamav/cmake/CheckFmapFeatures.cmake
Andrew 1eff784d51 cmake: Fix fuzzing fmap leak detection
The fuzz targets should use malloc instead of mmap because libFuzzer
doesn't seem to track mmap leaks.

The ENABLE_FUZZ feature disables HAVE_MMAP which is supposed to
disable use of mmap in favor of malloc, but it doesn't because
checks for the ANONYMOUS_MAP feature execute even if HAVE_MMAP
is disabled, and some mmap usage in libclamav only tests if
ANONYMOUS_MAP is defined without checking HAVE_MMAP.

This commit will only define ANONYMOUS_MAP if HAVE_MMAP is set.
2021-04-02 19:28:07 -07:00

4.8 KiB