Date: Thu, 01 Feb 2007 13:48:55 +0200 From: Alex Samorukov <samm@os2.kiev.ua> To: FreeBSD-gnats-submit@FreeBSD.org Cc: samm@os2.kiev.ua, delphij@FreeBSD.org Subject: ports/108657: [PATCH] mail/spamd: core dump on spamd-setup with "-t" key Message-ID: <E1HCaQx-000P78-6n@deepvision.tsua.net> Resent-Message-ID: <200702011230.l11CURxh088459@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1HCaQx-000P78-6n>