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