X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=crypto%2Fsha1.c;h=21571ed35b7ee7f90792a5f8b83ea2b42ff6cac6;hb=2e0e1f9f1c478ee14fb60524024f7b730df76912;hp=8048e2dd3c14e3343a7efc78985e787c70466bca;hpb=fa9b98fdab5b57ecb4dd3d6c2489e262af458c44;p=safe%2Fjmp%2Flinux-2.6 diff --git a/crypto/sha1.c b/crypto/sha1.c index 8048e2d..21571ed 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; }