Commit graph

25 commits

Author SHA1 Message Date
Val Snyder
7ff29b8c37
Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
Micah Snyder
c96130a23a
Email Parser: Reduce message multipart json logic complexity
Simplify JSON object handling in mbox scanning, eliminate a number of
single use functions, and reduce the places the JSON object is exposed.
2024-08-19 15:06:38 -04:00
Micah Snyder
47dfe9bd5d Remove libjson-c dead code
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.
2024-04-13 12:34:15 -04:00
Micah Snyder
9cb28e51e6 Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
Micah Snyder
6eebecc303 Bump copyright for 2023 2023-02-12 11:20:22 -08:00
mko-x
a21cc6dcd7
Add explicit log level parameter to application logging API
* 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
2022-02-15 15:13:55 -08:00
micasnyd
140c88aa4e Bump copyright for 2022
Includes minor format corrections.
2022-01-09 14:23:25 -07:00
Micah Snyder
c5b91947c6 Fix leak in email parser when using gen-json option
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`.
2021-10-30 17:13:52 -07:00
Micah Snyder (micasnyd)
b9ca6ea103 Update copyright dates for 2021
Also fixes up clang-format.
2021-03-19 15:12:26 -07:00
Micah Snyder
206dbaefe8 Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
Micah Snyder
52cddcbcfd Updating and cleaning up copyright notices. 2019-10-02 16:08:18 -04:00
Micah Snyder
72fd33c8b2 clang-format'd using new .clang-format rules. 2019-10-02 16:08:16 -04:00
Kevin Lin
e83019ae1a message: add preclass tracking object to message structure 2016-05-26 17:05:35 -04:00
Mickey Sola
46a35abe56 mass update of copyright headers 2015-09-17 13:41:26 -04:00
Tomasz Kojm
92012beb43 libclamav/message.c, mbox.c: fix out-of-memory null dereference in mbox/message (bb#1141)
git-svn: trunk@4158
2008-09-01 17:35:12 +00:00
Török Edvin
4270f93bcc (bb #913, #916)
* 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
2008-07-30 13:54:34 +00:00
Tomasz Kojm
2023340a41 update copyrights and stick more files to GPLv2; move and add more credits to the AUTHORS file; add COPYING.BSD
git-svn: trunk@3749
2008-04-02 15:24:51 +00:00
aCaB
b5231f5f67 realign structs see bb#474
git-svn: trunk@3537
2008-01-24 13:24:02 +00:00
Nigel Horne
7891ef0bc0 Add comment
git-svn: trunk@3426
2007-12-16 15:17:07 +00:00
Nigel Horne
9fe789f8b8 Many changes since 0.92
git-svn: trunk@3407
2007-12-13 16:18:18 +00:00
Nigel Horne
be32043eb7 More optimisations
git-svn: trunk@3217
2007-09-13 17:25:37 +00:00
Nigel Horne
94f051b0ac More optimisations
git-svn: trunk@3213
2007-09-12 13:25:13 +00:00
Nigel Horne
8affc4062b Various cleanups
git-svn: trunk@3207
2007-09-06 12:22:16 +00:00
Nigel Horne
641dbe1f37 Code clean up
git-svn: trunk@3206
2007-09-04 16:35:25 +00:00
Sven Strickroth
a99111f050 remove old CVS-stuff and make the repository look more like SVN
git-svn: trunk@2755
2007-02-17 19:02:20 +00:00
Renamed from clamav-devel/libclamav/message.h (Browse further)