From 7291d4b06e91097e8126d35ffaab5a0ed9f694bb Mon Sep 17 00:00:00 2001 From: Shubham Mittal Date: Wed, 12 Jun 2024 15:01:54 -0700 Subject: [PATCH] added null checks for out --- ssl/ssl_lib.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc index abe27d2574..81abc8023d 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc @@ -3048,6 +3048,10 @@ uint16_t SSL_get_peer_signature_algorithm(const SSL *ssl) { } int SSL_get_peer_signature_nid(const SSL *ssl, int *psig_nid) { + if(psig_nid == NULL) { + return 0; + } + uint16_t sig_alg = SSL_get_peer_signature_algorithm(ssl); if (sig_alg == 0) { return 0; @@ -3063,6 +3067,10 @@ int SSL_get_peer_signature_nid(const SSL *ssl, int *psig_nid) { } int SSL_get_peer_signature_type_nid(const SSL *ssl, int *psigtype_nid) { + if(psigtype_nid == NULL) { + return 0; + } + uint16_t sig_alg = SSL_get_peer_signature_algorithm(ssl); if (sig_alg == 0) { return 0;