]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: server - Explicitly NUL-terminate AUTH input line
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 3 Feb 2026 11:49:24 +0000 (13:49 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 6 Feb 2026 14:34:18 +0000 (14:34 +0000)
This wasn't practically an issue, since there was always a NUL at the end,
but it's a bit abusing the API.

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

index 0f5c74ae3d5bf65af64060431484081a0cdbdfc9..2e08c2976777c659da7e5acc8a85e5cd6819f4ff 100644 (file)
@@ -299,6 +299,7 @@ static int smtp_command_parse_parameters(struct smtp_command_parser *parser)
                /* Buffered also in the parser */
                buffer_append(parser->line_buffer, parser->cur,
                              (mp - parser->cur));
+               buffer_nul_terminate(parser->line_buffer);
                parser->state.cmd_params =
                        buffer_free_without_data(&parser->line_buffer);
        }