mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
Fix debug-mode assert-crash in mail parser
The mail parser uses asserts extensively to detect error conditions. It's lazy error handling; good for prototyping but bad for production. Release mode builds are fine in 0.103 with autotools and visual- studio but cmake release builds will crash because asserts are enabled even for release. In particular this assert(0) is a possible error condition in a malformed mail file and should be handled properly. This resolves: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31782#c2
This commit is contained in:
parent
72d438808b
commit
d9f0f030fc
1 changed files with 3 additions and 1 deletions
|
@ -2442,7 +2442,9 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re
|
|||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
cli_dbgmsg("Unepxected mime sub type\n");
|
||||
rc = CL_EFORMAT;
|
||||
break;
|
||||
}
|
||||
|
||||
if (mainMessage && (mainMessage != messageIn))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue