Commit Diff


commit - 3c23f6cdb61cc63d6fd9ecbcc015cd1347793eb1
commit + 3e0381db08c262a2f27c0fcd84d32f85ca5884e1
blob - f80d86a8686711ff5888dd6847e0d84b98bc0672
blob + 637d7ba897ccd275bbb6ab0bec6d48e64b58be76
--- lib/object_open_privsep.c
+++ lib/object_open_privsep.c
@@ -446,7 +446,7 @@ got_object_open(struct got_object **obj, struct got_re
 	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);