git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
crypto: sha512 - Fix byte counter overflow in SHA-512
[pandora-kernel.git]
/
crypto
/
sha512_generic.c
diff --git
a/crypto/sha512_generic.c
b/crypto/sha512_generic.c
index
107f6f7
..
dd30f40
100644
(file)
--- 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;