Browse Source

crypto: echainiv - Fix IV size in context size calculation

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 <herbert@gondor.apana.org.au>
Herbert Xu 10 years ago
parent
commit
9d03aee125
1 changed files with 1 additions and 1 deletions
  1. 1 1
      crypto/echainiv.c

+ 1 - 1
crypto/echainiv.c

@@ -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_alignmask |= __alignof__(u32) - 1;
 	inst->alg.base.cra_ctxsize = sizeof(struct echainiv_ctx);
 	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:
 done:
 	err = aead_register_instance(tmpl, inst);
 	err = aead_register_instance(tmpl, inst);