From 4f25aecd7599842205b135c0731b20a3c2c5d97b Mon Sep 17 00:00:00 2001 From: J Mohan Rao Arisankala Date: Wed, 24 Feb 2016 06:00:48 +0530 Subject: [PATCH] explicit check for NULL Reviewed-by: Matt Caswell Reviewed-by: Rich Salz --- crypto/asn1/a_sign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/asn1/a_sign.c b/crypto/asn1/a_sign.c index 6e6f497880..dbf2812d6f 100644 --- a/crypto/asn1/a_sign.c +++ b/crypto/asn1/a_sign.c @@ -243,12 +243,12 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, type = EVP_MD_CTX_md(ctx); pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_pkey_ctx(ctx)); - if (!type || !pkey) { + if (NULL == type || NULL == pkey) { ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_CONTEXT_NOT_INITIALISED); goto err; } - if (!pkey->ameth) { + if (NULL == pkey->ameth) { ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED); goto err; } -- 2.25.1