Skip to content

Commit

Permalink
crypto: echainiv - Fix IV size in context size calculation
Browse files Browse the repository at this point in the history
This patch fixes a bug in the context size calculation where we
were still referring to the old cra_aead.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed May 28, 2015
1 parent d97de47 commit 9d03aee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/echainiv.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static int echainiv_aead_create(struct crypto_template *tmpl,

inst->alg.base.cra_alignmask |= __alignof__(u32) - 1;
inst->alg.base.cra_ctxsize = sizeof(struct echainiv_ctx);
inst->alg.base.cra_ctxsize += inst->alg.base.cra_aead.ivsize;
inst->alg.base.cra_ctxsize += inst->alg.ivsize;

done:
err = aead_register_instance(tmpl, inst);
Expand Down

0 comments on commit 9d03aee

Please sign in to comment.