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 9f9553ae035e762d12dc7d885432abd920af6e5b..3ab65b7515d5a4cb9c8d9b6c4f8eb32121d3c628 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);