crypto: seqiv - Fix IV size in context size calculation
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 27 May 2015 06:37:39 +0000 (14:37 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 May 2015 03:23:19 +0000 (11:23 +0800)
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>
crypto/seqiv.c

index 9c4490b252561f209958c3e59935316095fd391a..c0dba8f2f46899403f99fbdfdc28922d323cf132 100644 (file)
@@ -812,7 +812,7 @@ static int seqniv_create(struct crypto_template *tmpl, struct rtattr **tb)
 
        inst->alg.base.cra_alignmask |= __alignof__(u32) - 1;
        inst->alg.base.cra_ctxsize = sizeof(struct seqiv_aead_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);