Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1277704 > unrolled thread

[PATCH 2/2] updating for keypayload null check.

Started byAmeen <ameenali023@gmail.com>
First post2015-11-25 20:10 +0100
Last post2015-11-25 20:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 2/2] updating for keypayload null check. Ameen <ameenali023@gmail.com> - 2015-11-25 20:10 +0100

#1277704 — [PATCH 2/2] updating for keypayload null check.

FromAmeen <ameenali023@gmail.com>
Date2015-11-25 20:10 +0100
Subject[PATCH 2/2] updating for keypayload null check.
Message-ID<qyNC1-1Wc-9@gated-at.bofh.it>
adding NULL check to make it fail safe.

Signed-Off-By : Ameen Ali <AmeenAli023@gmail.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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web