Merge pull request #2905 from ejohnstown/dtls-fuzz

DTLS Fuzz Fix
This commit is contained in:
toddouska
2020-04-14 14:19:09 -07:00
committed by GitHub

View File

@@ -14755,7 +14755,8 @@ int ProcessReply(WOLFSSL* ssl)
&ssl->curRL, &ssl->curSize);
#ifdef WOLFSSL_DTLS
if (ssl->options.dtls && ret == SEQUENCE_ERROR) {
if (ssl->keys.curEpoch != 0) {
if (ssl->keys.curEpoch == ssl->keys.dtls_epoch + 1) {
/* Store if in the next epoch. Probably finished. */
word32 sz = ssl->buffers.inputBuffer.length -
ssl->buffers.inputBuffer.idx +
DTLS_RECORD_HEADER_SZ;