summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-02-27 12:45:26 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-15 17:13:14 +0100
commit9c405157269dc7929280d7a9f0f07dc91fc77f58 (patch)
tree090cec407570b2eb0e54f4ee9d0fcea98280d5b7
parentb01f1d60dd1c353acdc3a0fabb7507859d629a7c (diff)
downloadlinux-stable-9c405157269dc7929280d7a9f0f07dc91fc77f58.tar.gz
linux-stable-9c405157269dc7929280d7a9f0f07dc91fc77f58.tar.bz2
linux-stable-9c405157269dc7929280d7a9f0f07dc91fc77f58.zip
PKCS#7: fix unitialized boolean 'want'
commit 06aae592425701851e02bb850cb9f4997f0ae163 upstream. The boolean want is not initialized and hence garbage. The default should be false (later it is only set to true on tne sinfo->authattrs check). Found with static analysis using CoverityScan Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David Howells <dhowells@redhat.com> Cc: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--crypto/asymmetric_keys/pkcs7_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asymmetric_keys/pkcs7_parser.c b/crypto/asymmetric_keys/pkcs7_parser.c
index 2516e97c58f1..5e5a8adac0ba 100644
--- a/crypto/asymmetric_keys/pkcs7_parser.c
+++ b/crypto/asymmetric_keys/pkcs7_parser.c
@@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(pkcs7_free_message);
static int pkcs7_check_authattrs(struct pkcs7_message *msg)
{
struct pkcs7_signed_info *sinfo;
- bool want;
+ bool want = false;
sinfo = msg->signed_infos;
if (!sinfo)