From 9316f3838a06082b0d11dc4de03d67ee1e123738 Mon Sep 17 00:00:00 2001 From: kris 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 c500a55f2546..c1a25dea2f53 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");