X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=csum-file.c;h=b7174c6c056c5a8f2a800ecbcb3cdf304c0bfc3f;hb=ced38ea252cb8b0315f4d2a54648b11c6c090657;hp=e2278897d08b750f383ae5bb2ac7e738a99a7ae5;hpb=78b713a1d0909c8eb8dc0bad5df624c33d065c16;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))