]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-server-cmd-helo - Fix segfault occurring when domain argument is inval...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Tue, 2 Jul 2019 22:40:05 +0000 (00:40 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 9 Jul 2019 08:59:09 +0000 (11:59 +0300)
src/lib-smtp/smtp-server-cmd-helo.c

index 4b0584c1b0de176208e6e1fd13a4869c7e4d9811..330ceaa64d8d60395747cf424afe068ba39e4599 100644 (file)
@@ -79,8 +79,8 @@ smtp_server_cmd_helo_run(struct smtp_server_cmd_ctx *cmd, const char *params,
        command->data = helo_data;
 
        if (conn->helo.domain == NULL ||
-               strcmp(conn->helo.domain, domain) != 0 ||
-               conn->helo.old_smtp != old_smtp)
+           (domain != NULL && strcmp(conn->helo.domain, domain) != 0) ||
+           conn->helo.old_smtp != old_smtp)
                helo_data->changed = TRUE; /* preliminary assessment */
 
        if (conn->pending_helo == NULL)