diff options
author | Richard Levitte <levitte@openssl.org> | 2002-06-05 11:58:29 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-06-05 11:58:29 +0000 |
commit | 9f353dd662b3287f0fc7d7dde53b2ddefc96e5ec (patch) | |
tree | e85e7ad338278d2ad22576d40eb4a184db7a4c51 /crypto | |
parent | b49053cae2ca17d80f772e4174ab3e639e7a896a (diff) |
Check errors when parsing a PKCS8INF PEM FILE, or there will be a core dump on error.
PR: 77
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/pem/pem_pkey.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 0e3faffa44..7d9f302777 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -87,6 +87,7 @@ EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, vo else if (strcmp(nm,PEM_STRING_PKCS8INF) == 0) { PKCS8_PRIV_KEY_INFO *p8inf; p8inf=d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, len); + if(!p8inf) goto p8err; ret = EVP_PKCS82PKEY(p8inf); PKCS8_PRIV_KEY_INFO_free(p8inf); } else if (strcmp(nm,PEM_STRING_PKCS8) == 0) { |