Browse Source

csum-file: fix missing buf pointer update

This would create broken pack archives for anything nontrivial.
maint
Linus Torvalds 20 years ago
parent
commit
2700628e64
  1. 1
      csum-file.c

1
csum-file.c

@ -58,6 +58,7 @@ int sha1write(struct sha1file *f, void *buf, unsigned int count) @@ -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);

Loading…
Cancel
Save