From e743c8779135b67056f8211cad867f79d3d4065e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 2 Jul 2004 18:36:25 +0300 Subject: [PATCH] i_stream_read_data() could have returned invalid data at EOF (notable with mboxes since end of mail = "EOF"). --HG-- branch : HEAD --- src/lib/istream.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.47.3