File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21162,18 +21162,19 @@ int ProcessReplyEx(WOLFSSL* ssl, int allowSocketErr)
2116221162 ssl->keys.decryptedCur = 1;
2116321163#ifdef WOLFSSL_TLS13
2116421164 if (ssl->options.tls1_3) {
21165- /* check that the end of the logical length doesn't extend
21166- * past the real buffer */
21165+ word16 i;
2116721166 word32 boundsCheck = (ssl->buffers.inputBuffer.idx +
2116821167 ssl->curSize - ssl->specs.aead_mac_size);
21168+ /* check that the end of the logical length doesn't extend
21169+ * past the real buffer */
2116921170 if (boundsCheck > ssl->buffers.inputBuffer.length ||
2117021171 boundsCheck == 0) {
2117121172 WOLFSSL_ERROR(BUFFER_ERROR);
2117221173 return BUFFER_ERROR;
2117321174 }
2117421175
2117521176 /* end of plaintext */
21176- word16 i = (word16)(boundsCheck);
21177+ i = (word16)(boundsCheck);
2117721178
2117821179 /* Remove padding from end of plain text. */
2117921180 for (--i; i > ssl->buffers.inputBuffer.idx; i--) {
You can’t perform that action at this time.
0 commit comments