]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC QTLS: Fix NULL dereference (coverity)
authorHugo Landau <hlandau@openssl.org>
Thu, 27 Jul 2023 15:06:42 +0000 (16:06 +0100)
committerHugo Landau <hlandau@openssl.org>
Thu, 10 Aug 2023 17:19:51 +0000 (18:19 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21565)

ssl/quic/quic_tls.c

index fd24026fa38351f5958dfab39f4aadd068c83600..e8d46f5e86bfe16ee1c7dab615146d44cca7f1cc 100644 (file)
@@ -14,9 +14,9 @@
 
 #define QUIC_TLS_FATAL(rl, ad, err) \
     do { \
-        (rl)->alert = (ad); \
+        if ((rl) != NULL) (rl)->alert = (ad); \
         ERR_raise(ERR_LIB_SSL, (err)); \
-        (rl)->qtls->inerror = 1; \
+        if ((rl) != NULL) (rl)->qtls->inerror = 1; \
     } while(0)
 
 struct quic_tls_st {