]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Assert-crash if empty referral is attempted to be sent
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 1 Jun 2022 08:06:13 +0000 (11:06 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 1 Jun 2022 08:13:29 +0000 (08:13 +0000)
This shouldn't happen anymore after allocating referral from the context
pool.

src/doveadm/client-connection-tcp.c

index 3763f0ae8c24ed36ea41164c9e1e9e91abe20a2c..777042f554f03f41c7c72811dee02f65035b6b15 100644 (file)
@@ -163,6 +163,7 @@ doveadm_cmd_server_post(struct client_connection_tcp *conn,
        const char *str = NULL;
 
        if (cctx->referral != NULL) {
+               i_assert(cctx->referral[0] != '\0');
                o_stream_nsend_str(conn->output, t_strdup_printf(
                        "\n-REFERRAL %s\n", cctx->referral));
                return;