X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=csum-file.c;h=b7174c6c056c5a8f2a800ecbcb3cdf304c0bfc3f;hb=ec771a7084ed9352ac6b14ed6ff437e67aba0f0b;hp=e2278897d08b750f383ae5bb2ac7e738a99a7ae5;hpb=e866ffdf9b2add0e0981d19b3c212c4621fd8a57;p=git.git diff --git a/csum-file.c b/csum-file.c index e2278897d..b7174c6c0 100644 --- a/csum-file.c +++ b/csum-file.c @@ -38,7 +38,7 @@ int sha1close(struct sha1file *f, unsigned char *result, int update) } SHA1_Final(f->buffer, &f->ctx); if (result) - memcpy(result, f->buffer, 20); + hashcpy(result, f->buffer); if (update) sha1flush(f, 20); if (close(f->fd))