[dovecot-cvs] dovecot/src/lib-storage/index/mbox istream-raw-mbox.c, 1.40.2.3, 1.40.2.4
cras at dovecot.org
cras at dovecot.org
Thu Aug 10 22:06:30 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv25383/lib-storage/index/mbox
Modified Files:
Tag: branch_1_0
istream-raw-mbox.c
Log Message:
We got into infinite loops if trying to open a 2 byte sized file as mbox.
Index: istream-raw-mbox.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c,v
retrieving revision 1.40.2.3
retrieving revision 1.40.2.4
diff -u -d -r1.40.2.3 -r1.40.2.4
--- istream-raw-mbox.c 7 Aug 2006 12:42:25 -0000 1.40.2.3
+++ istream-raw-mbox.c 10 Aug 2006 19:06:27 -0000 1.40.2.4
@@ -194,7 +194,7 @@
if (stream->istream.v_offset == rstream->from_offset) {
/* beginning of message, we haven't yet read our From-line */
- if (pos == 2) {
+ if (pos == 2 && ret > 0) {
/* we're at the end of file with CR+LF linefeeds?
need more data to verify it. */
rstream->input_peak_offset =
More information about the dovecot-cvs
mailing list