summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authoratishkov <a.tishkov@aladdin.ru>2023-10-23 13:50:44 +0300
committerHugo Landau <hlandau@openssl.org>2023-10-26 15:45:00 +0100
commit54fa5b3911ead0e1ba7d32bc5732ed2a60b38a99 (patch)
treed87ceebf9158d62310956c86e520f8022390dfcd /ssl
parenta595e90032a246276c441cf7276a9cf8811a2aa4 (diff)
ssl_lib: added pointer SSL_CONNECTION check to NULL before dereferencing it in ossl_ctrl_internal()
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22470) (cherry picked from commit 24844be16f0e4c30ae3386760ff571592b14b02f)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index bd9160b756..5314e1ec0d 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -2908,6 +2908,9 @@ long ossl_ctrl_internal(SSL *s, int cmd, long larg, void *parg, int no_quic)
long l;
SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(s);
+ if (sc == NULL)
+ return 0;
+
/*
* Routing of ctrl calls for QUIC is a little counterintuitive:
*