diff options
author | 2010-03-03 08:03:23 +0800 | |
---|---|---|
committer | 2010-03-03 08:03:23 +0800 | |
commit | cbb9bf65ae25dee772e85589136e7dd1c3e743ae (patch) | |
tree | 3dbb72e204bdcd15d7a36f27ef28f056b1367965 /crypto/cbc.c | |
parent | crypto: authenc - Use correct ahash complete functions (diff) | |
download | linux-cbb9bf65ae25dee772e85589136e7dd1c3e743ae.tar.gz linux-cbb9bf65ae25dee772e85589136e7dd1c3e743ae.tar.bz2 linux-cbb9bf65ae25dee772e85589136e7dd1c3e743ae.zip |
crypto: hash - Fix handling of unaligned buffers
The correct way to calculate the start of the aligned part of an
unaligned buffer is:
offset = ALIGN(offset, alignmask + 1);
However, crypto_hash_walk_done() has:
offset += alignmask - 1;
offset = ALIGN(offset, alignmask + 1);
which actually skips a whole block unless offset % (alignmask + 1) == 1.
This patch fixes the problem.
Signed-off-by: Szilveszter Ördög <slipszi@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/cbc.c')
0 files changed, 0 insertions, 0 deletions