Undo the change I picked up from the mailing list discussion suggested
by Nico, not because it is wrong, but it will be done at the end of the
follow-up series.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
{
int lenW = ctx->lenW;
- ctx->size += len;
+ ctx->size += (unsigned long long) len << 3;
/* Read the data into W and process blocks as they get full
*/
/* Pad with a binary 1 (ie 0x80), then zeroes, then length
*/
- padlen[0] = htonl(ctx->size >> (32 - 3));
- padlen[1] = htonl(ctx->size << 3);
+ padlen[0] = htonl(ctx->size >> 32);
+ padlen[1] = htonl(ctx->size);
blk_SHA1_Update(ctx, pad, 1+ (63 & (55 - ctx->lenW)));
blk_SHA1_Update(ctx, padlen, 8);