Fixing bug in POP3 analyzer.

With certain input the analyzer could end up trying to write to
non-writable memory.
This commit is contained in:
Robin Sommer 2014-02-06 20:23:34 -08:00
parent b64137761e
commit a048082e68
3 changed files with 9 additions and 5 deletions

View file

@ -1,4 +1,9 @@
2.2-142 | 2014-02-06 20:23:34 -0800
* Fixing bug in POP3 analyzer. With certain input the analyzer could
end up trying to write to non-writable memory. (Robin Sommer)
2.2-140 | 2014-02-06 17:58:04 -0800
* Fixing memory leaks in input framework. (Robin Sommer)

View file

@ -1 +1 @@
2.2-140
2.2-142

View file

@ -192,14 +192,13 @@ void POP3_Analyzer::ProcessRequest(int length, const char* line)
case AUTH_CRAM_MD5:
{ // Format: "user<space>password-hash"
char* s;
char* str = (char*) decoded->CheckString();
const char* s;
const char* str = (char*) decoded->CheckString();
for ( s = str; *s && *s != '\t' && *s != ' '; ++s )
;
*s = '\0';
user = str;
user = std::string(str, s);
password = "";
break;