From: Timo Sirainen Date: Wed, 11 Dec 2019 13:05:50 +0000 (+0200) Subject: lib-smtp: server: Fix copying xclient_extensions settings X-Git-Tag: 2.3.10~134 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f17d85b559ef9040777e3e0217cc149a08360671;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: server: Fix copying xclient_extensions settings smtp_server_connection didn't properly copy the xclient_extensions settings from the smtp_server. In fact it did the opposite of recreating the server settings using the connection pool. Later on after the connection was freed and another connection created this could result in crashes. --- diff --git a/src/lib-smtp/smtp-server-connection.c b/src/lib-smtp/smtp-server-connection.c index 5e0a148548..1bfb728591 100644 --- a/src/lib-smtp/smtp-server-connection.c +++ b/src/lib-smtp/smtp-server-connection.c @@ -864,7 +864,7 @@ smtp_server_connection_alloc(struct smtp_server *server, p_strarray_dup(pool, set->rcpt_param_extensions); } if (set->xclient_extensions != NULL) { - server->set.xclient_extensions = + conn->set.xclient_extensions = p_strarray_dup(pool, set->xclient_extensions); }