Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Oct 2003 10:06:38 +0300
From:      Andrew Belashov <bel@orel.ru>
To:        ab@astralblue.net
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: spamass-milter-0.2.0
Message-ID:  <3FA0B87E.3020308@orel.ru>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigB6B7248D425390898EAFBC45
Content-Type: multipart/mixed;
 boundary="------------000500090601080508010403"

This is a multi-part message in MIME format.
--------------000500090601080508010403
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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.

--------------000500090601080508010403
Content-Type: text/plain;
 name="patch-spamass-milter.cpp"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch-spamass-milter.cpp"

--- 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");

--------------000500090601080508010403--

--------------enigB6B7248D425390898EAFBC45
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/oLiDwF8YpH80o/IRAgd8AKCSjvA8zzT0/7OEh2FyQMbpWDi5dACaAsVV
xxW6oUwkKzaftLPO+DJZKKU=
=Q5Uh
-----END PGP SIGNATURE-----

--------------enigB6B7248D425390898EAFBC45--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FA0B87E.3020308>