fix 210800 problem parsing imap headers/messages with mal-formatted line terminators (CRCRLF) on windows r/sr=sspitzer

This commit is contained in:
bienvenu%netscape.com 2003-07-02 21:03:30 +00:00
Родитель 6fce1f2993
Коммит 4c18f672af
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -3292,6 +3292,14 @@ void nsImapProtocol::HandleMessageDownLoadLine(const char *line, PRBool chunkEnd
endOfLine[2] = '\0';
}
}
else if ((endOfLine - localMessageLine) >=3 && endOfLine[-3] == nsCRT::CR && endOfLine[-2] == nsCRT::CR
&& endOfLine[-1] == nsCRT::LF)
{
// CRCRLF -> CRLF
endOfLine[-2] = nsCRT::LF;
endOfLine[-1] = '\0';
}
}
}