diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/sha512_generic.c | 2 |
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) | |||
174 | index = sctx->count[0] & 0x7f; | 174 | index = sctx->count[0] & 0x7f; |
175 | 175 | ||
176 | /* Update number of bytes */ | 176 | /* Update number of bytes */ |
177 | if (!(sctx->count[0] += len)) | 177 | if ((sctx->count[0] += len) < len) |
178 | sctx->count[1]++; | 178 | sctx->count[1]++; |
179 | 179 | ||
180 | part_len = 128 - index; | 180 | part_len = 128 - index; |