From 245c87fe8f6f16c3d51604f26bf2762c32023d0a Mon Sep 17 00:00:00 2001 From: John Bland Date: Wed, 3 Jan 2024 17:39:20 -0500 Subject: [PATCH] clean up variable definitions --- src/internal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/internal.c b/src/internal.c index 8189e3eaa..5033744b7 100644 --- a/src/internal.c +++ b/src/internal.c @@ -21162,10 +21162,11 @@ default: ssl->keys.decryptedCur = 1; #ifdef WOLFSSL_TLS13 if (ssl->options.tls1_3) { - /* check that the end of the logical length doesn't extend - * past the real buffer */ + word16 i; word32 boundsCheck = (ssl->buffers.inputBuffer.idx + ssl->curSize - ssl->specs.aead_mac_size); + /* check that the end of the logical length doesn't extend + * past the real buffer */ if (boundsCheck > ssl->buffers.inputBuffer.length || boundsCheck == 0) { WOLFSSL_ERROR(BUFFER_ERROR); @@ -21173,7 +21174,7 @@ default: } /* end of plaintext */ - word16 i = (word16)(boundsCheck); + i = (word16)(boundsCheck); /* Remove padding from end of plain text. */ for (--i; i > ssl->buffers.inputBuffer.idx; i--) {