git: 36294c97c147 - stable/13 - man: the exists function needs to validate the first parameter
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 26 May 2024 05:44:18 UTC
The branch stable/13 has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=36294c97c147733c3f4408cb6ecfacb8de8cc282 commit 36294c97c147733c3f4408cb6ecfacb8de8cc282 Author: Wolfram Schneider <wosch@FreeBSD.org> AuthorDate: 2024-05-20 16:02:21 +0000 Commit: Wolfram Schneider <wosch@FreeBSD.org> CommitDate: 2024-05-26 05:43:45 +0000 man: the exists function needs to validate the first parameter This fixes an issue with the ".so " macro for FreeBSD ports manual pages. PR: 275978 Reported by: Jamie Landeg-Jones <jamie@catflap.org> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45231 (discussion) --- usr.bin/man/man.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index ca9b002dfc08..33be10cd5bd6 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -195,6 +195,10 @@ decho() { # Returns true if glob resolves to a real file and store the first # found filename in the variable $found exists() { + if [ -z "$1" ]; then + return 1 + fi + local IFS # Don't accidentally inherit callers IFS (breaks perl manpages)