This will only work with clamav-0.101.0 and above.
Patch itself:
--- ClamAv.cc.orig 2019-02-09 22:44:27.770356182 -0500
+++ ClamAv.cc.patched 2019-02-09 23:41:41.963098901 -0500
@@ -44,7 +44,12 @@
// We assume that cl_*() functions used here are threadsafe.
I found a thread about the same issue on Freebsd Bugzilla forum: /bugs.freebsd. org/bugzilla/ show_bug. cgi?id= 235002 cyrus-imapd that I borrowed (see below) and it worked for me, I was able to build ecap_clamav_adapter after modifying ClamAv.cc cyrus-imapd patch that I used a reference: /github. com/cyrusimap/ cyrus-imapd/ commit/ 09b5bf11e121857 27d53a6ae06d71a 767952a537# diff-e162ed934e d89d2014e496fc1 961be01
https:/
They provided a patch for cyrusimap/
cyrusimap/
https:/
This will only work with clamav-0.101.0 and above.
Patch itself:
--- ClamAv.cc.orig 2019-02-09 22:44:27.770356182 -0500
+++ ClamAv.cc.patched 2019-02-09 23:41:41.963098901 -0500
@@ -44,7 +44,12 @@
// We assume that cl_*() functions used here are threadsafe.
const char *virname = 0; answer. fileName. c_str() , &virname, 0, engine, CL_SCAN_STDOPT); answer. fileName. c_str() , &virname, 0, engine, &options);
- const int eScanResult = cl_scanfile(
+ static struct cl_scan_options options;
+
+ memset(&options, 0, sizeof(struct cl_scan_options));
+ options.parse |= ~0; /* enable all parsers */
+
+ const int eScanResult = cl_scanfile(
switch (eScanResult) {
case CL_CLEAN: