OSDN Git Service

X.509: Fix error code in x509_cert_parse()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 8 Jun 2017 13:47:49 +0000 (14:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:48:25 +0000 (19:48 +0200)
commit4b8fd8db48be40261cb1eafb8a9605a2e4d37091
treef56e90102b1b131f82f630a73a3b977ccfef3c25
parent45be9b7771600c650acfdcc8501999df8751f695
X.509: Fix error code in x509_cert_parse()

[ Upstream commit 4e880168e9ffb1cdbdb72b3b48ab0324b30c2d62 ]

We forgot to set the error code on this path so it could result in
returning NULL which leads to a NULL dereference.

Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/asymmetric_keys/x509_cert_parser.c