From 7b9f87267ee5491df9635e1d10b691464da2187c Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 7 Mar 2013 14:52:21 +0100 Subject: [PATCH] make parameters for mbox recog (line length) even more lax --- src/utils/idfile.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/utils/idfile.cpp b/src/utils/idfile.cpp index 5c45c7bb..6da344fc 100644 --- a/src/utils/idfile.cpp +++ b/src/utils/idfile.cpp @@ -64,7 +64,7 @@ static string idFileInternal(istream& input, const char *fn) int lnum = 1; for (int loop = 1; loop < 200; loop++, lnum++) { -#define LL 1024 +#define LL 2*1024 char cline[LL+1]; cline[LL] = 0; input.getline(cline, LL-1); @@ -102,15 +102,17 @@ static string idFileInternal(istream& input, const char *fn) } // emacs vm can insert VERY long header lines. - if (ll > 800) { + if (ll > LL - 20) { LOGDEB2(("idFile: Line too long\n")); return string(); } // Check for mbox 'From ' line if (lnum == 1 && !strncmp("From ", cline, 5)) { - if (treat_mbox_as_rfc822 == -1) + if (treat_mbox_as_rfc822 == -1) { line1HasFrom = true; + LOGDEB2(("idfile: line 1 has From_\n")); + } continue; }