Merge pull request #6355 from bandi13/minorBugfix

Should only move the index by the amount we wrote
This commit is contained in:
JacobBarthelmeh 2023-05-01 13:56:22 -06:00 committed by GitHub
commit 45c8796f7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20913,7 +20913,7 @@ int BuildMessage(WOLFSSL* ssl, byte* output, int outSz, const byte* input,
if (args->ivSz > 0) {
XMEMCPY(output + args->idx, args->iv,
min(args->ivSz, MAX_IV_SZ));
args->idx += args->ivSz;
args->idx += min(args->ivSz, MAX_IV_SZ);
}
XMEMCPY(output + args->idx, input, inSz);
args->idx += inSz;