Skip to content

Commit

Permalink
csum-file: fix missing buf pointer update
Browse files Browse the repository at this point in the history
This would create broken pack archives for anything nontrivial.
  • Loading branch information
Linus Torvalds committed Jun 28, 2005
1 parent 1f68855 commit 2700628
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions csum-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2700628

Please sign in to comment.