From 61c0c32a5eb5dd2b21c2e1b76b1f77c543021c3c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 8 Aug 2014 17:20:30 +0200 Subject: trust: Fix unlikely use of uninitialized memory in token loading --- trust/token.c | 6 +++--- 1 file 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; -- cgit v1.2.1