Mercurial > dovecot > core-2.2
changeset 20577:2d3c5cc2bdab
istream-decrypt: Fix error handling in stream header
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Thu, 04 Aug 2016 20:21:27 +0300 |
parents | 6e584af6f758 |
children | 7c4c18a512a9 |
files | src/lib-dcrypt/istream-decrypt.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-dcrypt/istream-decrypt.c Thu Aug 04 19:39:56 2016 +0300 +++ b/src/lib-dcrypt/istream-decrypt.c Thu Aug 04 20:21:27 2016 +0300 @@ -714,9 +714,10 @@ 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; }