From: Stef Walter Date: Fri, 8 Aug 2014 15:20:30 +0000 (+0200) Subject: trust: Fix unlikely use of uninitialized memory in token loading X-Git-Tag: 0.21.2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4750c617829b666dd1acb2a12ca61419fa12bc26;p=p11-kit trust: Fix unlikely use of uninitialized memory in token loading --- 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;