summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-20 20:14:58 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-20 20:14:58 +0200
commit277b5fb35b770792f89fbe50df03daddb3fa9521 (patch)
tree1b5558cff414274bbc07d1df6ca7cd743df20c4c /crypto
parentMerge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/... (diff)
parentcrypto: talitos - properly lock access to global talitos registers (diff)
downloadlinux-277b5fb35b770792f89fbe50df03daddb3fa9521.tar.xz
linux-277b5fb35b770792f89fbe50df03daddb3fa9521.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - Locking fix for talitos driver - Fix 64-bit counter overflow in SHA-512 - Build fix for ixp4xx. * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: talitos - properly lock access to global talitos registers crypto: ixp4xx - include fix crypto: sha512 - Fix byte counter overflow in SHA-512
Diffstat (limited to 'crypto')
-rw-r--r--crypto/sha512_generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
index 107f6f7be5e1..dd30f40af9f5 100644
--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, const u8 *data, unsigned int len)
index = sctx->count[0] & 0x7f;
/* Update number of bytes */
- if (!(sctx->count[0] += len))
+ if ((sctx->count[0] += len) < len)
sctx->count[1]++;
part_len = 128 - index;