summaryrefslogtreecommitdiffstats
path: root/crypto/sha1.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/sha1.c')
-rw-r--r--crypto/sha1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/sha1.c b/crypto/sha1.c
index 8048e2dd3c14..21571ed35b7e 100644
--- a/crypto/sha1.c
+++ b/crypto/sha1.c
@@ -61,8 +61,8 @@ static void sha1_update(void *ctx, const u8 *data, unsigned int len)
u32 temp[SHA_WORKSPACE_WORDS];
if (partial) {
- done = 64 - partial;
- memcpy(sctx->buffer + partial, data, done);
+ done = -partial;
+ memcpy(sctx->buffer + partial, data, done + 64);
src = sctx->buffer;
}