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

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

 



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

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

diff --git a/crypto/xts.c b/crypto/xts.c
index 5681d66..ca1608f 100644
--- a/crypto/xts.c
+++ b/crypto/xts.c
@@ -229,6 +229,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