Skip to content

Commit

Permalink
PKCS#7: fix unitialized boolean 'want'
Browse files Browse the repository at this point in the history
commit 06aae59 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>
  • Loading branch information
Colin Ian King authored and Greg Kroah-Hartman committed Nov 15, 2017
1 parent b01f1d6 commit 9c40515
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)
Expand Down

0 comments on commit 9c40515

Please sign in to comment.