From: Colin Ian King Date: Sat, 27 Feb 2016 12:45:26 +0000 (+0000) Subject: PKCS#7: fix unitialized boolean 'want' X-Git-Tag: v4.14-rc1~3645^2^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06aae592425701851e02bb850cb9f4997f0ae163;p=platform%2Fkernel%2Flinux-rpi.git PKCS#7: fix unitialized boolean 'want' 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 Signed-off-by: David Howells --- diff --git a/crypto/asymmetric_keys/pkcs7_parser.c b/crypto/asymmetric_keys/pkcs7_parser.c index 3ef62da..cbbd03f 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->authattrs) {