From b102a16b7b8086318a91b9738a1e9055b04622fa Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Sun, 5 Feb 2023 07:46:33 +0000 Subject: [PATCH] got_object_open: copy whole id not just the sha1 ok stsp@ --- lib/object_open_privsep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/object_open_privsep.c b/lib/object_open_privsep.c index 7b059d3b..93903995 100644 --- a/lib/object_open_privsep.c +++ b/lib/object_open_privsep.c @@ -444,7 +444,7 @@ got_object_open(struct got_object **obj, struct got_repository *repo, if (err) return err; - memcpy((*obj)->id.sha1, id->sha1, SHA1_DIGEST_LENGTH); + memcpy(&(*obj)->id, id, sizeof(*id)); (*obj)->refcnt++; return got_repo_cache_object(repo, id, *obj); -- 2.11.4.GIT