From owner-freebsd-ports@FreeBSD.ORG Wed Oct 29 23:07:02 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEBBB16A4CF for ; Wed, 29 Oct 2003 23:07:02 -0800 (PST) Received: from tts.orel.ru (tts.orel.ru [213.59.64.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59EC243FAF for ; Wed, 29 Oct 2003 23:07:00 -0800 (PST) (envelope-from bel@orel.ru) Received: from orel.ru (lg.orel.ru [62.33.11.59]) by tts.orel.ru (8.12.10/8.12.10/bel) with ESMTP id h9U76hwh025609; Thu, 30 Oct 2003 10:06:44 +0300 Message-ID: <3FA0B87E.3020308@orel.ru> Date: Thu, 30 Oct 2003 10:06:38 +0300 From: Andrew Belashov Organization: ORIS User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030411 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: ab@astralblue.net X-Enigmail-Version: 0.74.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB6B7248D425390898EAFBC45" X-Zombi-Check: on netra2.orel.ru cc: ports@FreeBSD.org Subject: FreeBSD Port: spamass-milter-0.2.0 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2003 07:07:02 -0000 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: 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 #include #include +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--