diff options
author | Karl Berry <karl@freefriends.org> | 2017-11-03 22:50:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-11-03 22:50:57 +0000 |
commit | d280e23580526277e20890e40d6551dd390851f4 (patch) | |
tree | abbed1ab83338c075cdc54ae076526266f590a20 /Build/source/texk/kpathsea/kdefault.c | |
parent | 753ccf29ee3c32686dbe1cb4ada792d0f26ec429 (diff) |
checks for empty program name, empty default strings
git-svn-id: svn://tug.org/texlive/trunk@45684 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/kdefault.c')
-rw-r--r-- | Build/source/texk/kpathsea/kdefault.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Build/source/texk/kpathsea/kdefault.c b/Build/source/texk/kpathsea/kdefault.c index bc25a5c2023..a0fc268eec3 100644 --- a/Build/source/texk/kpathsea/kdefault.c +++ b/Build/source/texk/kpathsea/kdefault.c @@ -3,7 +3,7 @@ make a program `default' from it, since we have a target `default'; and OSF/1 make doesn't understand .PHONY.) - Copyright 1993, 1994, 1996, 2008, 2009, 2011 Karl Berry. + Copyright 1993, 1994, 1996, 2008, 2009, 2011, 2017 Karl Berry. Copyright 2002, 2005 Olaf Weber. This library is free software; you can redistribute it and/or @@ -34,12 +34,13 @@ kpathsea_expand_default (kpathsea kpse, const_string path, { unsigned path_length; string expansion; - (void)kpse; /* currenty not used */ + + (void) kpse; /* unused */ /* The default path better not be null. */ assert (fallback); - if (path == NULL) + if (path == NULL || *path == 0) expansion = xstrdup (fallback); /* Solitary or leading :? */ |