From: Herbert Xu Date: Tue, 29 Apr 2008 13:57:01 +0000 (+0800) Subject: [CRYPTO] eseqiv: Fix off-by-one encryption X-Git-Tag: v2.6.26-rc1~24^2~1 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=46f8153cc59384eb09a426d044668d4801f818ce;p=linux-2.6-omap-h63xx.git [CRYPTO] eseqiv: Fix off-by-one encryption After attaching the IV to the head during encryption, eseqiv does not increase the encryption length by that amount. As such the last block of the actual plain text will be left unencrypted. Fortunately the only user of this code hifn currently crashes so this shouldn't affect anyone :) Signed-off-by: Herbert Xu --- diff --git a/crypto/eseqiv.c b/crypto/eseqiv.c index b14f14e314b..881d3091043 100644 --- a/crypto/eseqiv.c +++ b/crypto/eseqiv.c @@ -136,7 +136,8 @@ static int eseqiv_givencrypt(struct skcipher_givcrypt_request *req) } ablkcipher_request_set_crypt(subreq, reqctx->src, dst, - req->creq.nbytes, req->creq.info); + req->creq.nbytes + ivsize, + req->creq.info); memcpy(req->creq.info, ctx->salt, ivsize);