X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsha1.c;h=9c6c7ae3933d7b45a945a2404414b01bd2e4e95d;hb=56093e4d947bcc87bbc05ac3e8645509274f57b4;hp=67d5c964c6040471a3e5d0255f880ecf16075738;hpb=fdc2a18856ce9690d412a7c357c72f69832ec54c;p=gnulib.git diff --git a/lib/sha1.c b/lib/sha1.c index 67d5c964c..9c6c7ae39 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -217,9 +217,9 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) if (ctx->buflen > 64) { - ctx->buflen &= 63; - sha1_process_block (ctx->buffer, ctx->buflen, ctx); + sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx); + ctx->buflen &= 63; /* The regions in the following copy operation cannot overlap. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~63],