From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 1 12:30:27 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67C6C16A403 for ; Thu, 1 Feb 2007 12:30:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 48CA113C4BB for ; Thu, 1 Feb 2007 12:30:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l11CUR5G088465 for ; Thu, 1 Feb 2007 12:30:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l11CURxh088459; Thu, 1 Feb 2007 12:30:27 GMT (envelope-from gnats) Resent-Date: Thu, 1 Feb 2007 12:30:27 GMT Resent-Message-Id: <200702011230.l11CURxh088459@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Samorukov Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4180816A400; Thu, 1 Feb 2007 12:28:15 +0000 (UTC) (envelope-from root@deepvision.tsua.net) Received: from deepvision.tsua.net (deepvision.tsua.net [212.40.43.22]) by mx1.freebsd.org (Postfix) with ESMTP id E712713C478; Thu, 1 Feb 2007 12:28:14 +0000 (UTC) (envelope-from root@deepvision.tsua.net) Received: from root by deepvision.tsua.net with local (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HCaQx-000P78-6n; Thu, 01 Feb 2007 13:48:55 +0200 Message-Id: Date: Thu, 01 Feb 2007 13:48:55 +0200 From: Alex Samorukov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: samm@os2.kiev.ua, delphij@FreeBSD.org Subject: ports/108657: [PATCH] mail/spamd: core dump on spamd-setup with "-t" key X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2007 12:30:27 -0000 >Number: 108657 >Category: ports >Synopsis: [PATCH] mail/spamd: core dump on spamd-setup with "-t" key >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Feb 01 12:30:26 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Alex Samorukov >Release: FreeBSD 5.4-RELEASE-p22 i386 >Organization: Shevchenko Didkovskiy and Partners >Environment: System: FreeBSD deepvision.tsua.net 5.4-RELEASE-p22 FreeBSD 5.4-RELEASE-p22 #5: Sun Oct 1 22:52:07 EEST >Description: I tried to use BSD spamd with IPFW. Because i`m using table 1-2 for other purpose than spamd i tried to use -t key. It works just fine with spamd, but fail with core dump on spamd-setup. While looking into the source code i found that author forgot to add ":" after 't' getopt options, so it pass no argument (null) into optarg and then it crash on atoi(null). Port maintainer (delphij@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: run 'spamd-setup -t 2' >Fix: --- spamd-3.7_2.patch begins here --- diff -ruN --exclude=CVS /usr/ports/mail/spamd/files/patch-spamd-setup /root/tmp/ports/spamd/files/patch-spamd-setup --- /usr/ports/mail/spamd/files/patch-spamd-setup Thu Feb 1 13:32:47 2007 +++ /root/tmp/ports/spamd/files/patch-spamd-setup Wed May 10 20:55:07 2006 @@ -91,7 +91,7 @@ +#ifndef IPFW while ((ch = getopt(argc, argv, "nd")) != -1) { +#else -+ while ((ch = getopt(argc, argv, "ndt:")) != -1) { ++ while ((ch = getopt(argc, argv, "ndt")) != -1) { +#endif switch (ch) { case 'n': --- spamd-3.7_2.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: