From: Neil Horman Date: Sat, 26 Jul 2025 13:18:11 +0000 (-0400) Subject: Fix NULL check in bring_oscp_resp_in_correct_order X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ceae5a6226c6c909c7ce0b4582d0d698e5d1357;p=thirdparty%2Fopenssl.git Fix NULL check in bring_oscp_resp_in_correct_order We assign an allocated pointer to *sk_resp but only check if sk_resp is NULL when sk_resp is a pointer to a pointer Addresses https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1659227 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 d23e5defa51..c09395c69b2 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -635,7 +635,7 @@ static int bring_ocsp_resp_in_correct_order(SSL *s, tlsextstatusctx *srctx, /* reserve enough space so the pushes to the stack would not fail */ *sk_resp = sk_OCSP_RESPONSE_new_reserve(NULL, num); - if (sk_resp == NULL) + if (*sk_resp == NULL) return SSL_TLSEXT_ERR_ALERT_FATAL; for (i = 0; i < num; i++) {