X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=crypto%2Fcts.c;h=ccf9c5de39584b32d34f26dc9a0e278f812825ac;hb=6c5121b78ba5c70a9990e2af6cb4d6bbffe0d4d8;hp=c4e70bfb4970140b644eb5ea492935b0de97c357;hpb=77a50df2b14c8d3ee3c58c21c4a0e0157570df09;p=linux-2.6-omap-h63xx.git diff --git a/crypto/cts.c b/crypto/cts.c index c4e70bfb497..ccf9c5de395 100644 --- a/crypto/cts.c +++ b/crypto/cts.c @@ -89,6 +89,9 @@ static int cts_cbc_encrypt(struct crypto_cts_ctx *ctx, if (lastn < 0) return -EINVAL; + sg_init_table(sgsrc, 1); + sg_init_table(sgdst, 1); + memset(s, 0, sizeof(s)); scatterwalk_map_and_copy(s, src, offset, nbytes, 0); @@ -172,6 +175,9 @@ static int cts_cbc_decrypt(struct crypto_cts_ctx *ctx, if (lastn < 0) return -EINVAL; + sg_init_table(sgsrc, 1); + sg_init_table(sgdst, 1); + scatterwalk_map_and_copy(s, src, offset, nbytes, 0); lcldesc.tfm = ctx->child;