[PATCH 2/2] crypto: lrw: fix nblocks not being updated in walk loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In lrw_crypt() function, nblocks should be updated after blkcipher_walk_done
call.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@xxxxxxxx>
---
 crypto/lrw.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/crypto/lrw.c b/crypto/lrw.c
index 66c4d22..ba42acc 100644
--- a/crypto/lrw.c
+++ b/crypto/lrw.c
@@ -284,6 +284,7 @@ first:
 		if (!nbytes)
 			break;
 
+		nblocks = min(nbytes / bsize, max_blks);
 		src = (be128 *)walk.src.virt.addr;
 		dst = (be128 *)walk.dst.virt.addr;
 	}

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux