Fix for major bug in POP3 analyzer, which didn't recognize '.'

terminators in multi-line replies if the terminator was bare (no
newline). This caused it to ignore the rest of the session that it's
analyzing.

Patch from #444 by Vern.
This commit is contained in:
Robin Sommer 2011-05-10 17:11:01 -07:00
parent e2c194c990
commit d1db768624

View file

@ -576,9 +576,11 @@ void POP3_Analyzer::ProcessReply(int length, const char* line)
if ( multiLine == true )
{
bool terminator =
length > 1 && line[0] == '.' &&
(line[1] == '\n' ||
(length > 2 && line[1] == '\r' && line[2] == '\n'));
line[0] == '.' &&
(length == 1 ||
(length > 1 &&
(line[1] == '\n' ||
(length > 2 && line[1] == '\r' && line[2] == '\n'))));
if ( terminator )
{