Skip to content

Commit

Permalink
Small fix in aes_glue.
Browse files Browse the repository at this point in the history
  • Loading branch information
rben-dev committed Mar 10, 2023
1 parent 7b188c8 commit 0e35c9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aes/aes_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ int aes_mode(aes_context * aes_ctx, const unsigned char *data_in,
memcpy(iv_tmp, data_out + (AES_BLOCK_SIZE * i),
sizeof(iv_tmp));
}
memcpy(aes_ctx->iv, iv_tmp, sizeof(iv_tmp));
} else if (aes_ctx->dir == AES_DECRYPT) {
unsigned int i, j;
uint8_t iv_tmp[AES_BLOCK_SIZE];
Expand All @@ -151,6 +152,7 @@ int aes_mode(aes_context * aes_ctx, const unsigned char *data_in,
}
memcpy(iv_tmp, tmp, sizeof(iv_tmp));
}
memcpy(aes_ctx->iv, iv_tmp, sizeof(iv_tmp));
} else {
goto err;
}
Expand Down

0 comments on commit 0e35c9e

Please sign in to comment.