Commit Diff


commit - babd9f5d19e75f2db561f5873c7acaf5f56c0480
commit + 407521c004a585e93d6e493eb0d5193f67197edd
blob - 75466594fc2f21be250335c66831f6aa2992ee42
blob + cce4cea87c0a4dcf12328d3491728a50bcce8f84
--- 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 - 81a2c482755eaf9ad6e0e776dd9ea29f24c9507f
blob + 48bdc5abc37116465cd5276b7720b4809ef3079c
--- 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);