OpenSSL: Fix possible null pointer dereference on an OCSP error path
Fix possible null pointer dereference in check_ocsp_resp() if an memory allocation fails. Signed-off-by: Ayala Beker <ayala.beker@intel.com>
This commit is contained in:
parent
a3cc64f3d2
commit
443c8e18de
1 changed files with 2 additions and 0 deletions
|
@ -562,6 +562,8 @@ enum ocsp_result check_ocsp_resp(SSL_CTX *ssl_ctx, SSL *ssl, X509 *cert,
|
|||
|
||||
if (basic->certs) {
|
||||
untrusted = sk_X509_dup(basic->certs);
|
||||
if (!untrusted)
|
||||
goto fail;
|
||||
|
||||
num = sk_X509_num(basic->certs);
|
||||
for (i = 0; i < num; i++) {
|
||||
|
|
Loading…
Reference in a new issue