From 6bbc17b8dc2680a87559ae6b8b7897eec8d39e66 Mon Sep 17 00:00:00 2001 From: ru Date: Tue, 13 Feb 2001 16:55:42 +0000 Subject: Do not allow non-absolute pathnames in the manpath. --- gnu/usr.bin/man/manpath/manpath.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnu/usr.bin') diff --git a/gnu/usr.bin/man/manpath/manpath.c b/gnu/usr.bin/man/manpath/manpath.c index bdfbfc6..c500a55 100644 --- a/gnu/usr.bin/man/manpath/manpath.c +++ b/gnu/usr.bin/man/manpath/manpath.c @@ -423,6 +423,14 @@ get_manpath (perrs, path) if (debug) fprintf (stderr, "\npath directory %s ", p); + if (*p != '/') + { + if (debug) + fprintf (stderr, "is not an absolute pathname\n"); + + goto found; /* skip. */ + } + /* * The directory we're working on is in the config file. * If we haven't added it to the list yet, do. -- cgit v1.1