Commit Diff


commit - 5458cb76da2e5c4d71fa0f50379368f77e5380b3
commit + 08175cbb494791a8de66d4f28a3b38da7ca956e7
blob - 637d7ba897ccd275bbb6ab0bec6d48e64b58be76
blob + c1e3ec7439e9913c3938302e0d374e4d688c6fcd
--- lib/object_open_privsep.c
+++ lib/object_open_privsep.c
@@ -1013,7 +1013,7 @@ open_blob(struct got_blob_object **blob, struct got_re
 
 	(*blob)->hdrlen = hdrlen;
 	(*blob)->blocksize = blocksize;
-	memcpy(&(*blob)->id.sha1, id->sha1, SHA1_DIGEST_LENGTH);
+	memcpy(&(*blob)->id, id, sizeof(*id));
 
 done:
 	free(path_packfile);