From sclawson@marker.cs.utah.edu  Tue Jun 17 15:27:12 1997
Received: from marker.cs.utah.edu (marker.cs.utah.edu [155.99.212.61])
          by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA12242
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Jun 1997 15:27:08 -0700 (PDT)
Received: (from sclawson@localhost) by marker.cs.utah.edu (8.8.5/8.7.3) id QAA29888; Tue, 17 Jun 1997 16:27:07 -0600 (MDT)
Message-Id: <199706172227.QAA29888@marker.cs.utah.edu>
Date: Tue, 17 Jun 1997 16:27:07 -0600 (MDT)
From: stephen clawson <sclawson@marker.cs.utah.edu>
Reply-To: sclawson@marker.cs.utah.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: manpath segfaults if it dosen't understand a line in manpath.config.
X-Send-Pr-Version: 3.2

>Number:         3894
>Category:       gnu
>Synopsis:       manpath segfaults if it dosen't understand a line in manpath.config.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    steve
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 17 15:30:00 PDT 1997
>Closed-Date:    Sat Nov 29 17:02:43 PST 1997
>Last-Modified:  Sat Nov 29 17:03:37 PST 1997
>Originator:     stephen clawson
>Release:        FreeBSD 2.1.7-RELEASE i386
>Organization:
// stephen clawson				sclawson@cs.utah.edu
// university of utah			        
>Environment:

	

	Standard FreeBSD 2.1.7-RELEASE manpath binary on a ppro 200.

>Description:

	

	manpath segfaults if it dosen't understand a line in
manpath.config because it's calling gripe_reading_mp_config without 
an argument.

>How-To-Repeat:

	Put anything nonstandard in /etc/manpath.config (ie. add 
a `foo' at the end), or misspell one of the keywords like I did. =)

>Fix:
	
	

	Either hardcode the config file name in 
gripe_reading_mp_config, or add the required argument.  This seems to
affect all versions of FreeBSD and should probably be fixed in _both_
copies of manpath.c (/usr/src/gnu/usr.bin/man/{manpath,man}/manpath.c).


diff -u -r1.2 manpath.c
--- manpath.c   1995/05/30 05:02:05     1.2
+++ manpath.c   1997/06/17 21:24:47
@@ -135,7 +135,7 @@
   char *get_manpath ();

   if (get_dirlist ())
-      gripe_reading_mp_config ();
+      gripe_reading_mp_config (config_file);

   if ((manpathlist = getenv ("MANPATH")) != NULL)
     /*
@@ -254,7 +254,7 @@
        }
       else
        {
-         gripe_reading_mp_config ();
+         gripe_reading_mp_config (config_file);
        }
       dlp++;
     }
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sat Nov 29 17:02:43 PST 1997 
State-Changed-Why:  
Fixed in both manpath.c files in -current. 
>Unformatted:
