diff options
author | Stef Walter <stef@thewalter.net> | 2014-08-08 17:20:30 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2014-08-08 17:21:22 +0200 |
commit | 61c0c32a5eb5dd2b21c2e1b76b1f77c543021c3c (patch) | |
tree | 9cbad09fb436f2adb6cc83c642aea0fce11bf348 | |
parent | 46cb35baaae90e62367dd0b4265e3f6e39453e62 (diff) | |
download | p11-kit-61c0c32a5eb5dd2b21c2e1b76b1f77c543021c3c.tar.gz |
trust: Fix unlikely use of uninitialized memory in token loading
-rw-r--r-- | trust/token.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/trust/token.c b/trust/token.c index 15ca018..1ed26eb 100644 --- a/trust/token.c +++ b/trust/token.c @@ -301,10 +301,10 @@ loader_load_path (p11_token *token, if (errno != ENOENT) p11_message_err (errno, "cannot access trust certificate path: %s", path); loader_gone_file (token, path); - return 0; - } + *is_dir = false; + ret = 0; - if (S_ISDIR (sb.st_mode)) { + } else if (S_ISDIR (sb.st_mode)) { *is_dir = true; ret = 0; |