From 958fec3b453c660e31e1f3ce8a3318c90b3c5b36 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 10 Nov 2020 16:40:28 -0600 Subject: [PATCH] internal.c:ProcessPeerCerts(): fix a core.NullDereference detected by llvm9 and llvm11 scan-builds. --- src/internal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/internal.c b/src/internal.c index 1ed9448d2..16f868bfd 100644 --- a/src/internal.c +++ b/src/internal.c @@ -10729,6 +10729,9 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx, if (ssl->options.tls1_3) { word16 extSz; + if (args->exts == NULL) { + ERROR_OUT(BUFFER_ERROR, exit_ppc); + } if ((args->idx - args->begin) + OPAQUE16_LEN > totalSz) { ERROR_OUT(BUFFER_ERROR, exit_ppc); }