Commit Diff


commit - d77295e3494661d565f3c3e60d10df899d4d681c
commit + 564a8b0186283eb09c998068c2431c5428aca9f3
blob - 987d21472295c1330914aa2c9d116c3471d2e9db
blob + d79b113af28100c54b6f82d0f6eaecd37cb038e2
--- lib/got_lib_privsep.h
+++ lib/got_lib_privsep.h
@@ -304,7 +304,7 @@ struct got_imsg_raw_obj {
 
 /* Structure for GOT_IMSG_RAW_DELTA. */
 struct got_imsg_raw_delta {
-	uint8_t base_id[SHA1_DIGEST_LENGTH];
+	struct got_object_id base_id;
 	uint64_t base_size;
 	uint64_t result_size;
 	off_t delta_size;
blob - 0d1be9196af32089efcbdf9c85b3e0a3a8ee0771
blob + fa06692e098df51709ea8fb02f1886572c45fd5a
--- lib/privsep.c
+++ lib/privsep.c
@@ -2984,7 +2984,7 @@ got_privsep_send_raw_delta(struct imsgbuf *ibuf, uint6
 	idelta.delta_compressed_size = delta_compressed_size;
 	idelta.delta_offset = delta_offset;
 	idelta.delta_out_offset = delta_out_offset;
-	memcpy(idelta.base_id, base_id->sha1, SHA1_DIGEST_LENGTH);
+	memcpy(&idelta.base_id, &base_id, sizeof(idelta.base_id));
 
 	ret = imsg_compose(ibuf, GOT_IMSG_RAW_DELTA, 0, 0, -1,
 	    &idelta, sizeof(idelta));
@@ -3037,7 +3037,7 @@ got_privsep_recv_raw_delta(uint64_t *base_size, uint64
 			err = got_error_from_errno("malloc");
 			break;
 		}
-		memcpy((*base_id)->sha1, delta->base_id, SHA1_DIGEST_LENGTH);
+		memcpy(*base_id, &delta->base_id, sizeof(**base_id));
 		break;
 	default:
 		err = got_error(GOT_ERR_PRIVSEP_MSG);