]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: Fix matched-parameter in HEADER_FILTER_ADD_MISSING_EOH callback
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 19 Feb 2017 22:26:28 +0000 (00:26 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 19 Feb 2017 22:28:00 +0000 (00:28 +0200)
The matched-parameter in the regular EOH callback is the reverse of what
it's in v2.3 tree. So preserve it here.

src/lib-mail/istream-header-filter.c

index 6f00e5e9a79deff67704beb8aa7215b32fc92c4d..566e04255150545d16687648aa485049eb329fc1 100644 (file)
@@ -306,7 +306,7 @@ static ssize_t read_header(struct header_filter_istream *mstream)
                        return -1;
                }
                if (!mstream->seen_eoh && mstream->add_missing_eoh) {
-                       bool matched = FALSE;
+                       bool matched = TRUE;
 
                        mstream->seen_eoh = TRUE;
 
@@ -326,7 +326,7 @@ static ssize_t read_header(struct header_filter_istream *mstream)
                                mstream->callbacks_called = TRUE;
                        }
 
-                       if (matched) {
+                       if (!matched) {
                                mstream->seen_eoh = FALSE;
                        } else {
                                add_eol(mstream, mstream->last_orig_crlf);