소스 검색

Merge pull request #6355 from bandi13/minorBugfix

Should only move the index by the amount we wrote
JacobBarthelmeh 1 년 전
부모
커밋
45c8796f7c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/internal.c

+ 1 - 1
src/internal.c

@@ -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;