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

Fixed error in the SMTP message composition that caused mixing of CRLF and LF...

Fixed error in the SMTP message composition that caused mixing of CRLF and LF in redirected messages.
parent 751e4095
No related branches found
No related tags found
No related merge requests found
......@@ -142,22 +142,22 @@ void rfc2822_header_field_write
/* Existing newline ? */
if ( nlp != NULL ) {
/* Replace any sort of newline with proper CRLF */
/* Replace any sort of newline with LF */
while ( *bp == '\r' || *bp == '\n' )
bp++;
fwrite(sp, nlp-sp, 1, f);
if ( *bp != '\0' && *bp != ' ' && *bp != '\t' )
fwrite("\r\n\t", 3, 1, f);
fwrite("\n\t", 2, 1, f);
else
fwrite("\r\n", 2, 1, f);
fwrite("\n", 1, 1, f);
sp = bp;
} else {
/* Insert newline at last whitespace within the max_line limit */
fwrite(sp, wp-sp, 1, f);
fwrite("\r\n", 2, 1, f);
fwrite("\n", 1, 1, f);
sp = wp;
}
......@@ -166,8 +166,10 @@ void rfc2822_header_field_write
nlp = NULL;
}
fwrite(sp, bp-sp, 1, f);
fwrite("\r\n", 2, 1, f);
if ( bp != sp ) {
fwrite(sp, bp-sp, 1, f);
fwrite("\n", 1, 1, f);
}
}
void rfc2822_header_field_printf
......
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.