ports/108657: [PATCH] mail/spamd: core dump on spamd-setup with "-t" key

Alex Samorukov samm at os2.kiev.ua
Thu Feb 1 12:30:27 UTC 2007


>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 at 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:



More information about the freebsd-ports-bugs mailing list