diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-05-21 23:00:08 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-05-21 23:21:36 +0100 |
commit | c923d57663183da3b738dbc9f999d3e2e620305b (patch) | |
tree | 3d4be4c7b8f5183ee562f367370fa35edc1edecb /src/crypto/x509.c | |
parent | f20c3742e713092ee04cdfd1aa65d5d640be6a77 (diff) | |
download | ipxe-c923d57663183da3b738dbc9f999d3e2e620305b.tar.gz |
[crypto] Return a NULL X.509 certificate if construction fails
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/crypto/x509.c')
-rw-r--r-- | src/crypto/x509.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crypto/x509.c b/src/crypto/x509.c index 18a8cebe0..2180173b0 100644 --- a/src/crypto/x509.c +++ b/src/crypto/x509.c @@ -1068,6 +1068,7 @@ int x509_certificate ( const void *data, size_t len, /* Parse certificate */ if ( ( rc = x509_parse ( *cert, &cursor ) ) != 0 ) { x509_put ( *cert ); + *cert = NULL; return rc; } |