From: Linus Torvalds Date: Tue, 28 Jun 2005 00:02:56 +0000 (-0700) Subject: csum-file: fix missing buf pointer update X-Git-Tag: v0.99~155 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2700628e64939c9496f8ca532b7c188e5927d500;p=git.git csum-file: fix missing buf pointer update This would create broken pack archives for anything nontrivial. --- diff --git a/csum-file.c b/csum-file.c index 9f9553ae..3ab65b75 100644 --- a/csum-file.c +++ b/csum-file.c @@ -58,6 +58,7 @@ int sha1write(struct sha1file *f, void *buf, unsigned int count) memcpy(f->buffer + offset, buf, nr); count -= nr; offset += nr; + buf += nr; left -= nr; if (!left) { SHA1_Update(&f->ctx, f->buffer, offset);