[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1448478255-5443-1-git-send-email-AmeenAli023@gmail.com>
Date: Wed, 25 Nov 2015 21:04:15 +0200
From: Ameen <ameenali023@...il.com>
To: herbert@...dor.apana.org.au, davem@...emloft.net,
dhowells@...hat.com
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
Ameen <AmeenAli023@...il.com>
Subject: [PATCH 2/2] updating for keypayload null check.
adding NULL check to make it fail safe.
Signed-Off-By : Ameen Ali <AmeenAli023@...il.com>
---
crypto/asymmetric_keys/x509_public_key.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c
index 2a44b37..76610cc 100644
--- a/crypto/asymmetric_keys/x509_public_key.c
+++ b/crypto/asymmetric_keys/x509_public_key.c
@@ -286,6 +286,10 @@ static int x509_key_preparse(struct key_preparsed_payload *prep)
char *desc = NULL, *p;
int ret;
+ if(prep == NULL){
+ pr_debug("NULL payload");
+ return PTR_ERR(prep);
+ }
cert = x509_cert_parse(prep->data, prep->datalen);
if (IS_ERR(cert))
return PTR_ERR(cert);
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists