FreeBSD Port: spamass-milter-0.2.0
Andrew Belashov
bel at orel.ru
Wed Oct 29 23:07:02 PST 2003
Hi!
Please add attached security/stability related patch.
spamass-milter.cpp:
If there is no body, set bob to point to the end of the string returned
by spamassassin instead of string::npos.
See also:
<http://savannah.nongnu.org/cgi-bin/viewcvs/spamass-milt/spamass-milt/spamass-milter.cpp.diff?r1=1.55&r2=1.56>
With best regards,
Andrew Belashov.
-------------- next part --------------
--- spamass-milter.cpp.orig Thu Jun 26 19:10:44 2003
+++ spamass-milter.cpp Wed Oct 29 13:43:29 2003
@@ -102,6 +102,10 @@
#include <csignal>
#include <string>
#include <iostream>
+using std::string;
+using std::cout;
+using std::cerr;
+using std::endl;
#ifdef __cplusplus
extern "C" {
@@ -350,6 +354,9 @@
string::size_type eoh2(assassin->d().find("\n\r\n"));
string::size_type eoh = ( eoh1 < eoh2 ? eoh1 : eoh2 );
string::size_type bob = assassin->d().find_first_not_of("\r\n", eoh);
+
+ if (bob == string::npos)
+ bob = assassin->d().size();
update_or_insert(assassin, ctx, assassin->spam_flag(), &SpamAssassin::set_spam_flag, "X-Spam-Flag");
update_or_insert(assassin, ctx, assassin->spam_status(), &SpamAssassin::set_spam_status, "X-Spam-Status");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 250 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20031030/6370f6ca/attachment.bin
More information about the freebsd-ports
mailing list