csum-file: fix missing buf pointer update
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 28 Jun 2005 00:02:56 +0000 (17:02 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 28 Jun 2005 00:02:56 +0000 (17:02 -0700)
This would create broken pack archives for anything nontrivial.

csum-file.c

index 9f9553a..3ab65b7 100644 (file)
@@ -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);