internal.c:ProcessPeerCerts(): fix a core.NullDereference detected by llvm9 and llvm11 scan-builds.

This commit is contained in:
Daniel Pouzzner
2020-11-10 16:40:28 -06:00
parent 7b50cddf8c
commit 958fec3b45

View File

@@ -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);
}