From 1384276a3fd91d8fe357affafdc1d0ef74ec41ab Mon Sep 17 00:00:00 2001 From: dockes Date: Sun, 5 Nov 2006 21:10:22 +0000 Subject: [PATCH] fix binc imap infinite loop on multipart with null boundary --- src/bincimapmime/mime-parsefull.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bincimapmime/mime-parsefull.cc b/src/bincimapmime/mime-parsefull.cc index 816548f8..56bb32a8 100644 --- a/src/bincimapmime/mime-parsefull.cc +++ b/src/bincimapmime/mime-parsefull.cc @@ -641,6 +641,10 @@ static void parseSinglePart(const string &toboundary, mimeSource->ungetChar(); mimeSource->ungetChar(); } + } else { + // Recoll: in the case of a null boundary (probably illegal but wtf), eof + // was not set and multipart went into a loop until bad alloc. + *eof = true; } // make sure bodylength doesn't overflow