commit 6583092f7f08b82a9004b2cb84625d3a74f6add6 from: Omar Polo date: Sat Feb 04 14:00:31 2023 UTC copy whole id, not only the hash commit - b94703ce28d8c088927b2412ca63592c10dc3b37 commit + 6583092f7f08b82a9004b2cb84625d3a74f6add6 blob - 67bb2a09a9972db9c6d66f087be7f8e1388b0212 blob + 00e90888057ebe0739a2c658cd96b7237c33fad3 --- lib/object_open_privsep.c +++ lib/object_open_privsep.c @@ -447,7 +447,7 @@ got_object_open(struct got_object **obj, struct got_re if (err) return err; - memcpy((*obj)->id.hash, id->hash, SHA1_DIGEST_LENGTH); + memcpy(&(*obj)->id, id, sizeof(*id)); (*obj)->refcnt++; return got_repo_cache_object(repo, id, *obj);