[LBBS-146] mod_mimeparse: Crash when parsing swap file
This crash occured when manually inspecting a file in an active maildir directly using nano (rather than copying it elsewhere before doing so).
This then causes mod_mimeparse to crash, since bbs_mime_make_bodystructure is called and it is assumed that mime->message is non-NULL, even though bbs_mime_message_parse doesn't return NULL if mk_mime fails.
Thread 1 (Thread 0x7fe2b8ff9700 (LWP 241413)):
#0 0x00007fe2dd1e7a9a in bbs_mime_make_bodystructure (mime=0x7fe2d4032730) at mod_mimeparse.c:411
message = 0x0
str = 0x7fe2c0047740
result = 0x7fe2b8ff2960 "/home/bbs/maildir/1/REDACTED/cur/.1773493822188547_50,S=45511,U=51,M=52:2,S.swp"
#1 0x00007fe2dd02c590 in process_fetch_finalize (imap=0x7fe2b8ff8830, fetchreq=0x7fe2b8ff4c60, seqno=51, fullname=0x7fe2b8ff2960 "/home/bbs/maildir/1/REDACTED/cur/.1773493822188547_50,S=45511,U=51,M=52:2,S.swp", response=0x7fe2b8ff2b70 "UID 51 FLAGS (\\Seen) RFC822.SIZE 45511 INTERNALDATE \"14-Mar-2026 09:43:37 -0400\"", responselen=8192, buf=0x7fe2b8ff4b80, len=0x7fe2b8ff4b7c) at imap_server_fetch.c:772
bodystructure = 0x0
fbr = 0x0
fp = 0x0
size = 0
res = 0
mime = 0x7fe2d4032730
__func__ = "process_fetch_finalize"Comments
You must be logged in to leave a comment.