git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77ba115
)
crypto: hash - Fix handling of unaligned buffers
author
Szilveszter Ördög
<slipszi@gmail.com>
Wed, 3 Mar 2010 00:03:23 +0000
(08:03 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 3 Mar 2010 00:03:23 +0000
(08:03 +0800)
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>
crypto/ahash.c
patch
|
blob
|
history
diff --cc
crypto/ahash.c
Simple merge