Skip to content

Commit

Permalink
istream-decrypt: Fix error handling in stream header
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and sirainen committed Aug 4, 2016
1 parent baf8f0a commit 089b8ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib-dcrypt/istream-decrypt.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 089b8ee

Please sign in to comment.