]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
istream-decrypt: Fix error handling in stream header
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 4 Aug 2016 17:21:27 +0000 (20:21 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 4 Aug 2016 17:26:36 +0000 (20:26 +0300)
src/lib-dcrypt/istream-decrypt.c

index 67f34e0971e2b662e60bc4f86953d25fc9408b95..6fbaf736e34fa1db02c5beab462a9777a7f31ff7 100644 (file)
@@ -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;
                                }