diff --git a/CHANGES b/CHANGES index 345e945207..801b7fcd10 100644 --- a/CHANGES +++ b/CHANGES @@ -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) diff --git a/VERSION b/VERSION index 8611c50ec0..56b1a615cd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2-140 +2.2-142 diff --git a/src/analyzer/protocol/pop3/POP3.cc b/src/analyzer/protocol/pop3/POP3.cc index 388a055ee2..1b6b4c53b6 100644 --- a/src/analyzer/protocol/pop3/POP3.cc +++ b/src/analyzer/protocol/pop3/POP3.cc @@ -192,14 +192,13 @@ void POP3_Analyzer::ProcessRequest(int length, const char* line) case AUTH_CRAM_MD5: { // Format: "userpassword-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;