diff options
author | 2010-03-09 18:29:57 +0000 | |
---|---|---|
committer | 2010-03-09 18:29:57 +0000 | |
commit | b77d002fafc8b95326801c53f8a4e5eedacfb249 (patch) | |
tree | cafa5dbb0f4895407b40e8c530b0d6ce23e0ffa7 | |
parent | Tweak default set selection so X sets are in the default list when (diff) | |
download | wireguard-openbsd-b77d002fafc8b95326801c53f8a4e5eedacfb249.tar.xz wireguard-openbsd-b77d002fafc8b95326801c53f8a4e5eedacfb249.zip |
Don't attempt to dereference gl_pathv if the gl_pathc returned by glob(3) is
zero.
ok deraadt@, millert@
-rw-r--r-- | usr.bin/sudo/match.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sudo/match.c b/usr.bin/sudo/match.c index 78c2b3e1635..71fa82224f1 100644 --- a/usr.bin/sudo/match.c +++ b/usr.bin/sudo/match.c @@ -465,7 +465,7 @@ command_matches_glob(sudoers_cmnd, sudoers_args) * else return false. */ #define GLOB_FLAGS (GLOB_NOSORT | GLOB_MARK | GLOB_BRACE | GLOB_TILDE) - if (glob(sudoers_cmnd, GLOB_FLAGS, NULL, &gl) != 0) { + if (glob(sudoers_cmnd, GLOB_FLAGS, NULL, &gl) != 0 || gl.gl_pathc == 0) { globfree(&gl); return(FALSE); } |