Date: Fri, 9 Apr 1999 16:08:05 -0500 (EST) From: klikes@isd.state.in.us To: FreeBSD-gnats-submit@freebsd.org Subject: ports/11048: fwtk 2.1 smap coredumps under 3.1-STABLE Message-ID: <199904092108.QAA38008@jaka.isd.state.in.us>
next in thread | raw e-mail | index | archive | help
>Number: 11048 >Category: ports >Synopsis: variable not initialized in fwtk-lib leads to syslog coredump >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 9 14:40:04 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Kevin T. Likes >Release: FreeBSD 3.1-STABLE i386 >Organization: State of Indiana Department of Administration Information Services Division >Environment: fwtk 2.1 running on 3.1-STABLE. fwtk was patch with the no-spam patch from http://www.sabernet.net/software/smap_nospam.tar.gz. This patch does not touch the library where the bug is, except to add extra calls to some functions. >Description: In the function hostmatch in the fwtk library, there is a variable rev which is declared but never initialized before first reference. The code appears to assume that is has a null value. Sometimes, however, it does not which causes a call to syslog to coredump. This bug still exists in a version of fwtk downloaded from their site yesterday. >How-To-Repeat: Running smap patched with smap_nospam patch on a server from netacl. Include at least one "relay-domain" line in netacl. From a host not in that relay-domain, whose forward DNS lookup does not match the reverse lookup for it's ip, connect to the smap server. Type in a mail from:user@domain and rcpt to:user@domain, where domain is not in the relay domain. smap will coredump after the rcpt to: line. I have been able to do this reliably locally. >Fix: Apply the following patch. This patch was sent to the fwtk-support address, but no reply has been forthcoming. -----------cut here------------- *** nama.c.orig Wed Apr 7 12:44:30 1999 --- nama.c Wed Apr 7 12:53:32 1999 *************** *** 347,352 **** --- 347,354 ---- char *rev; eq = 0; + rev = (char *) NULL; + while(*p != '\0' && (*p == '.' || isdigit(*p))) p++; *************** *** 385,391 **** } while((hp_addr = (struct in_addr *)*hp->h_addr_list++) != (struct in_addr *)0) { ! if (hp_addr && !rev) rev = inet_ntoa(*hp_addr); if(bcmp(hp_addr,&f,hp->h_length) == 0) { eq = 1; --- 387,393 ---- } while((hp_addr = (struct in_addr *)*hp->h_addr_list++) != (struct in_addr *)0) { ! if (hp_addr && (rev == (char *) NULL)) rev = inet_ntoa(*hp_addr); if(bcmp(hp_addr,&f,hp->h_length) == 0) { eq = 1; ----------cut here----------- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904092108.QAA38008>