Commit 8d98bcfbe89f15be150c562a2a8b715e456bd7e9

Stefan Sperling 2018-04-02T15:40:46

mark imsg structs which contain got_object_id as __packed__

diff --git a/lib/got_lib_privsep.h b/lib/got_lib_privsep.h
index 061e48d..6d63ebb 100644
--- a/lib/got_lib_privsep.h
+++ b/lib/got_lib_privsep.h
@@ -114,7 +114,7 @@ struct got_imsg_object {
 	struct got_object_id id;
 
 	int ndeltas; /* this many GOT_IMSG_DELTA messages follow */
-};
+} __attribute__((__packed__));
 
 /* Structure for GOT_IMSG_LOOSE_OBJECT_HEADER_REPLY data. */
 struct got_imsg_loose_object_header_reply {
@@ -154,7 +154,7 @@ struct got_imsg_tree_entry {
 	struct got_object_id id;
 	mode_t mode;
 	/* Followed by entry's name in remaining data of imsg buffer. */
-};
+} __attribute__((__packed__));
 
 /* Structure for transmitting struct got_tree_object data in an imsg. */
 struct got_imsg_tree_object {