]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Don't crash if postmaster_address is given as command line parameter.
authorTimo Sirainen <tss@iki.fi>
Wed, 13 May 2015 16:36:29 +0000 (19:36 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 13 May 2015 16:36:29 +0000 (19:36 +0300)
src/lib-lda/lda-settings.c

index 7cb97e6430bd54e8be11d68e7fd1e769b4fa9259..63f257f3feee571f47ee3c19041a065d80c56359 100644 (file)
@@ -77,8 +77,8 @@ static bool lda_settings_check(void *_set, pool_t pool, const char **error_r)
 
        if (*set->hostname == '\0')
                set->hostname = p_strdup(pool, my_hostdomain());
-       i_assert(set->postmaster_address[0] == SETTING_STRVAR_UNEXPANDED[0]);
-       if (set->postmaster_address[1] == '\0') {
+       if (set->postmaster_address[0] == SETTING_STRVAR_UNEXPANDED[0] &&
+           set->postmaster_address[1] == '\0') {
                /* check for valid looking fqdn in hostname */
                if (strchr(set->hostname, '.') == NULL) {
                        *error_r = "postmaster_address setting not given";