From: Neil Horman Date: Sat, 26 Jul 2025 13:30:53 +0000 (-0400) Subject: Fix NULL check in get_ocsp_resp_from_responder X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c4f009959c4b73b78219da51e49bb564a24ef48;p=thirdparty%2Fopenssl.git Fix NULL check in get_ocsp_resp_from_responder We assign an allocation to *sk_resp, but only check for NULL on sk_resp, not the value it points to. Addresses https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1659222 Reviewed-by: Viktor Dukhovni Reviewed-by: David von Oheimb Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/28101) --- diff --git a/apps/s_server.c b/apps/s_server.c index 0360bfccdf0..3edb53d00a4 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -786,7 +786,7 @@ static int get_ocsp_resp_from_responder(SSL *s, tlsextstatusctx *srctx, *sk_resp = sk_OCSP_RESPONSE_new_reserve(NULL, num); - if (sk_resp == NULL) + if (*sk_resp == NULL) return SSL_TLSEXT_ERR_ALERT_FATAL; /* for each certificate in chain (except root) get the OCSP response */