Skip to content

Commit

Permalink
PKCS#7: fix unitialized boolean 'want'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and David Howells committed Feb 29, 2016
1 parent 8e16789 commit 06aae59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/asymmetric_keys/pkcs7_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 06aae59

Please sign in to comment.