From: Timo Sirainen Date: Thu, 20 Jan 2022 17:23:43 +0000 (+0100) Subject: lmtp: proxy: Fix bad error handling code path with assert X-Git-Tag: 2.4.0~4605 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=990380d467be33a650bdf6d54b79ebd1b34cc505;p=thirdparty%2Fdovecot%2Fcore.git lmtp: proxy: Fix bad error handling code path with assert --- diff --git a/src/lmtp/lmtp-proxy.c b/src/lmtp/lmtp-proxy.c index 8c1cb16684..0679dc398c 100644 --- a/src/lmtp/lmtp-proxy.c +++ b/src/lmtp/lmtp-proxy.c @@ -560,8 +560,8 @@ lmtp_proxy_rcpt_parse_redirect(const struct smtp_reply *proxy_reply, const char **host_r, struct ip_addr *ip_r, in_port_t *port_r, const char **error_r) { - if (proxy_reply->text_lines == NULL) - return -1; + i_assert(proxy_reply->text_lines != NULL); + return smtp_proxy_redirect_parse(*proxy_reply->text_lines, destuser_r, host_r, ip_r, port_r, error_r); }