]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-fs: istream-metawrap - set stream_errno=EPIPE on unexpected EOF
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 23 Dec 2016 18:23:39 +0000 (13:23 -0500)
committerGitLab <gitlab@git.dovecot.net>
Fri, 23 Dec 2016 18:49:23 +0000 (20:49 +0200)
src/lib-fs/istream-metawrap.c

index d5644fbb953f83b69bb5e010f97341aeff20af83..87b9c3d1fafe3e98e701721fc13028eb430598a4 100644 (file)
@@ -43,7 +43,7 @@ static int metadata_header_read(struct metawrap_istream *mstream)
                        io_stream_set_error(&mstream->istream.iostream,
                                "Metadata header is missing ending line at offset %"PRIuUOFF_T,
                                mstream->istream.istream.v_offset);
-                       mstream->istream.istream.stream_errno = EINVAL;
+                       mstream->istream.istream.stream_errno = EPIPE;
                        return -1;
                }
                mstream->istream.istream.eof = TRUE;