From: Aki Tuomi Date: Thu, 4 Aug 2016 17:21:27 +0000 (+0300) Subject: istream-decrypt: Fix error handling in stream header X-Git-Tag: 2.2.26~424 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=089b8ee22fd845147d908e103336dbb2c4769f36;p=thirdparty%2Fdovecot%2Fcore.git istream-decrypt: Fix error handling in stream header --- diff --git a/src/lib-dcrypt/istream-decrypt.c b/src/lib-dcrypt/istream-decrypt.c index 67f34e0971..6fbaf736e3 100644 --- a/src/lib-dcrypt/istream-decrypt.c +++ b/src/lib-dcrypt/istream-decrypt.c @@ -714,9 +714,10 @@ i_stream_decrypt_read(struct istream_private *stream) if ((hret=i_stream_decrypt_read_header (dstream, dstream->buf->data, dstream->buf->used)) <= 0) { - if (hret < 0 && stream->istream.stream_errno == 0) { - /* assume temporary failure */ - stream->istream.stream_errno = EIO; + if (hret < 0) { + if (stream->istream.stream_errno == 0) + /* assume temporary failure */ + stream->istream.stream_errno = EIO; return -1; }