From: Timo Sirainen Date: Fri, 2 Jul 2004 15:36:25 +0000 (+0300) Subject: i_stream_read_data() could have returned invalid data at EOF (notable with X-Git-Tag: 1.1.alpha1~3841 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e743c8779135b67056f8211cad867f79d3d4065e;p=thirdparty%2Fdovecot%2Fcore.git i_stream_read_data() could have returned invalid data at EOF (notable with mboxes since end of mail = "EOF"). --HG-- branch : HEAD --- diff --git a/src/lib/istream.c b/src/lib/istream.c index 0d84246520..7e1fe0b6c2 100644 --- a/src/lib/istream.c +++ b/src/lib/istream.c @@ -190,6 +190,7 @@ int i_stream_read_data(struct istream *stream, const unsigned char **data, ret = i_stream_read(stream); } while (ret >= 0); + *data = i_stream_get_data(stream, size); return ret == -2 ? -2 : *size > 0 ? 0 : -1; }