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

Signed-off-by: Jussi Kivilinna <jussi.kivili...@mbnet.fi>
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to