Skip to content
Snippets Groups Projects
Commit 11ada0e2 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

lib-sieve: util: edit-mail - Fix assert occurring when bad header is encountered.

In that case, the header name and middle are empty, causing:

Panic: file edit-mail.c: line 820 (edit_mail_headers_parse): assertion failed: (body_offset > 0)

Fixed by skipping the bad header for parsing altogether.
parent 33bb5ef9
No related branches found
No related tags found
No related merge requests found
......@@ -767,6 +767,9 @@ static int edit_mail_headers_parse(struct edit_mail *edmail)
if (hdr == NULL || hdr->eoh)
break;
/* Skip bad headers */
if (hdr->name_len == 0)
continue;
/* We deny the existence of any `Content-Length:'
header. This header is non-standard and it can wreak
havok when the message is modified.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.