]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-client - Send correct size value for BDAT command when the data lacks CR.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 6 Feb 2019 19:54:26 +0000 (20:54 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 21 Mar 2019 08:02:49 +0000 (10:02 +0200)
The addition of CR was ignored in the size specification because the original
unaltered stream was used for the size calculations.

src/lib-smtp/smtp-client-command.c

index 8a5486ba06c58c75a9fbf96aff538bed08646ff9..fe575cf5851a3dae061a9c81cab8898a32801ee5 100644 (file)
@@ -1401,7 +1401,7 @@ smtp_client_command_data_submit_after(
 
        } else {
                /* BDAT */
-               ctx->data = i_stream_create_crlf(data);
+               ctx->data = data = i_stream_create_crlf(data);
 
                p_array_init(&ctx->cmds, ctx->pool,
                        conn->set.max_data_chunk_pipeline);