Fixed buffer overrun (read only, usually harmless, but sloppy nonetheless).
This commit is contained in:
parent
298ce6530e
commit
93185df1e7
4 changed files with 4 additions and 4 deletions
|
|
@ -378,7 +378,7 @@ br_aes_ct64_skey_expand(uint64_t *skey,
|
|||
{
|
||||
unsigned u, v, n;
|
||||
|
||||
n = (num_rounds + 1) << 2;
|
||||
n = (num_rounds + 1) << 1;
|
||||
for (u = 0, v = 0; u < n; u ++, v += 4) {
|
||||
uint64_t x0, x1, x2, x3;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ br_aes_ct64_cbcdec_run(const br_aes_ct64_cbcdec_keys *ctx,
|
|||
void *iv, void *data, size_t len)
|
||||
{
|
||||
unsigned char *buf;
|
||||
uint64_t sk_exp[240];
|
||||
uint64_t sk_exp[120];
|
||||
uint32_t ivw[4];
|
||||
|
||||
br_aes_ct64_skey_expand(sk_exp, ctx->num_rounds, ctx->skey);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ br_aes_ct64_cbcenc_run(const br_aes_ct64_cbcenc_keys *ctx,
|
|||
void *iv, void *data, size_t len)
|
||||
{
|
||||
unsigned char *buf;
|
||||
uint64_t sk_exp[240];
|
||||
uint64_t sk_exp[120];
|
||||
uint32_t ivw[4];
|
||||
|
||||
br_aes_ct64_skey_expand(sk_exp, ctx->num_rounds, ctx->skey);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ br_aes_ct64_ctr_run(const br_aes_ct64_ctr_keys *ctx,
|
|||
{
|
||||
unsigned char *buf;
|
||||
uint32_t ivw[16];
|
||||
uint64_t sk_exp[240];
|
||||
uint64_t sk_exp[120];
|
||||
|
||||
br_aes_ct64_skey_expand(sk_exp, ctx->num_rounds, ctx->skey);
|
||||
br_range_dec32le(ivw, 3, iv);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue