summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-10-27 02:12:52 +0000
committerkris <kris@FreeBSD.org>2002-10-27 02:12:52 +0000
commit9316f3838a06082b0d11dc4de03d67ee1e123738 (patch)
treeb020dd736dd8bc9be3925b2dd663341e1cdf2259 /gnu
parentac78845d159d2abe5574f6b0cd741607c1b59540 (diff)
downloadFreeBSD-src-9316f3838a06082b0d11dc4de03d67ee1e123738.zip
FreeBSD-src-9316f3838a06082b0d11dc4de03d67ee1e123738.tar.gz
Don't dump core if none of the directories in /etc/manpath.config exist.
Submitted by: terry
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/man/manpath/manpath.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/usr.bin/man/manpath/manpath.c b/gnu/usr.bin/man/manpath/manpath.c
index c500a55..c1a25de 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");
OpenPOWER on IntegriCloud