From eb0f0a174a88295ee31e727bec7dbbeda6d02b40 Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Sun, 27 Oct 2002 02:12:52 +0000 Subject: [PATCH] Don't dump core if none of the directories in /etc/manpath.config exist. Submitted by: terry --- gnu/usr.bin/man/manpath/manpath.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/usr.bin/man/manpath/manpath.c b/gnu/usr.bin/man/manpath/manpath.c index c500a55f254..c1a25dea2f5 100644 --- a/gnu/usr.bin/man/manpath/manpath.c +++ b/gnu/usr.bin/man/manpath/manpath.c @@ -493,6 +493,9 @@ get_manpath (perrs, path) lp++; } + if (!len) + return strdup(""); + manpathlist = (char *) malloc (len); if (manpathlist == NULL) gripe_alloc (len, "manpathlist");