@@ -23199,7 +23199,8 @@ static int DoProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
2319923199 WOLFSSL_MSG("Dropping DTLS record outside receiving "
2320023200 "window");
2320123201 ssl->options.processReply = doProcessInit;
23202- ssl->buffers.inputBuffer.idx += ssl->curSize;
23202+ ssl->buffers.inputBuffer.idx += ssl->curSize
23203+ + ssl->keys.padSz;
2320323204 if (ssl->buffers.inputBuffer.idx >
2320423205 ssl->buffers.inputBuffer.length)
2320523206 return BUFFER_E;
@@ -23314,8 +23315,12 @@ static int DoProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
2331423315 exit */
2331523316 ssl->earlyData = no_early_data;
2331623317 ssl->options.processReply = doProcessInit;
23317- if (ssl->options.clientInEarlyData)
23318+ if (ssl->options.clientInEarlyData) {
23319+ if (IsEncryptionOn(ssl, 0))
23320+ ssl->buffers.inputBuffer.idx +=
23321+ ssl->keys.padSz;
2331823322 return APP_DATA_READY;
23323+ }
2331923324 }
2332023325#endif /* WOLFSSL_EARLY_DATA */
2332123326 if (ret == 0 ||
@@ -23361,8 +23366,12 @@ static int DoProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
2336123366 ssl->options.handShakeState == HANDSHAKE_DONE) {
2336223367 ssl->earlyData = no_early_data;
2336323368 ssl->options.processReply = doProcessInit;
23364- if (ssl->options.clientInEarlyData)
23369+ if (ssl->options.clientInEarlyData) {
23370+ if (IsEncryptionOn(ssl, 0))
23371+ ssl->buffers.inputBuffer.idx +=
23372+ ssl->keys.padSz;
2336523373 return APP_DATA_READY;
23374+ }
2336623375 }
2336723376 #endif
2336823377#else
0 commit comments