From judgea@marita.indigo.ie  Thu Jan 13 04:10:39 2000
Return-Path: <judgea@marita.indigo.ie>
Received: from marita.indigo.ie (marita.indigo.ie [194.125.133.243])
	by hub.freebsd.org (Postfix) with ESMTP id 1160F155F2
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Jan 2000 04:10:33 -0800 (PST)
	(envelope-from judgea@marita.indigo.ie)
Received: (from root@localhost)
	by marita.indigo.ie (8.9.3/8.9.3) id MAA10151;
	Thu, 13 Jan 2000 12:10:30 GMT
	(envelope-from judgea)
Message-Id: <200001131210.MAA10151@marita.indigo.ie>
Date: Thu, 13 Jan 2000 12:10:30 GMT
From: Alan.Judge@indigo.ie
Sender: judgea@marita.indigo.ie
Reply-To: Alan.Judge@indigo.ie
To: FreeBSD-gnats-submit@freebsd.org
Cc: Alan.Judge@indigo.ie
Subject: core dump bug in syslogd, with fix
X-Send-Pr-Version: 3.2

>Number:         16098
>Category:       bin
>Synopsis:       If you syslogd -vv and get an unknown facility or pri -> dump
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 13 04:20:00 PST 2000
>Closed-Date:    Thu Jan 13 05:16:07 PST 2000
>Last-Modified:  Thu Jan 13 05:17:00 PST 2000
>Originator:     Alan Judge
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
Indigo
>Environment:

	syslog server collecting from multiple machines

>Description:

	If syslogd, under flags -vv, gets an unknown facility or priority,
	you get a core dump.  Bug is in both stable and current, I think.

>How-To-Repeat:


>Fix:
	
cvs diff: Diffing .
Index: syslogd.c
===================================================================
RCS file: /f5/misc/FreeBSD/cvs/src/usr.sbin/syslogd/syslogd.c,v
retrieving revision 1.46.2.4
diff -u -r1.46.2.4 syslogd.c
--- syslogd.c   1999/08/29 15:48:31     1.46.2.4
+++ syslogd.c   2000/01/13 12:01:16
@@ -828,13 +828,13 @@
                if (LogFacPri > 1) {
                  CODE *c;
 
-                 for (c = facilitynames; c; c++) {
+                 for (c = facilitynames; c->c_name; c++) {
                    if (c->c_val == fac) {
                      f_s = c->c_name;
                      break;
                    }
                  }
-                 for (c = prioritynames; c; c++) {
+                 for (c = prioritynames; c->c_name; c++) {
                    if (c->c_val == pri) {
                      p_s = c->c_name;
                      break;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Thu Jan 13 05:16:07 PST 2000 
State-Changed-Why:  
Patch applied to both -current and -stable, thanks! 
>Unformatted:
