Skip to content

Commit a0a1647

Browse files
committed
Fix IV handling for AES-CBC on reinit with NULL IV
1 parent aad3272 commit a0a1647

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp_aes_block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ static int wp_aes_block_init(wp_AesBlockCtx *ctx, const unsigned char *key,
319319
ok = 0;
320320
}
321321
if (ok) {
322-
int rc = wc_AesSetKey(&ctx->aes, key, (word32)ctx->keyLen, iv,
322+
int rc = wc_AesSetKey(&ctx->aes, key, (word32)ctx->keyLen, ctx->iv,
323323
enc ? AES_ENCRYPTION : AES_DECRYPTION);
324324
if (rc != 0) {
325325
ok = 0;

0 commit comments

Comments
 (0)