As of ClamAV 0.105, libjson-c is required.
There is also no option to disable libjson-c support.
This commit removes the dead code associated with the old build
option.
* Added loglevel parameter to logg()
* Fix logg and mprintf internals with new loglevels
* Update all logg calls to set loglevel
* Update all mprintf calls to set loglevel
* Fix hidden logg calls
* Executed clam-format
The mbox.c:messageGetFilename() function returns a COPY of the filename,
which must be free()'d.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31775
Also fixed and issue where the email parser may fail to finish parsing
soem multipart emails when --gen-json is enabled if messageGetJObj() or
cli_json_addowner() fail. These should be non-fatal failures. The rest
of the (broken) email should be parsed.
The email parser (mbox.c & message.c) also has a lot of assertions
instead using if()'s for error handling.
Because of the complexity of the email parser, it's unclear for many of
the assertions if they could be triggered based on user input like
scanning a malformed email. So to be safe, I've replaced all of the
assertions in this parser with error handling to fail gracefully.
Also fix formatting issues and use `stdbool.h`'s `true` instead of `TRUE`.
* fix scan of partial messages
* allow for tempfiles to be cleaned up based on age
* new clamd.conf option ScanPartialMessages
* sample cleanup script
* clamd/thrmgr.c: fix item_count
git-svn: trunk@4031