mirror of https://github.com/thesofproject/sof.git
ipcgtw: fix potential memory misalignment in structure definition
Two structures are both need 4 bytes aligned, since its content started with int32, add 4 bytes align in current code. Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This commit is contained in:
parent
bf6b875bd0
commit
857d547b52
|
@ -78,7 +78,7 @@ struct ipc4_ipc_gateway_cmd_data {
|
|||
union ipc4_connector_node_id node_id;
|
||||
/* Payload (actual size is in the header extension.r.data_size) */
|
||||
uint8_t payload[];
|
||||
};
|
||||
} __packed __aligned(4);
|
||||
|
||||
/* Reply to IPC gateway message */
|
||||
struct ipc4_ipc_gateway_cmd_data_reply {
|
||||
|
@ -90,7 +90,7 @@ struct ipc4_ipc_gateway_cmd_data_reply {
|
|||
* This payload size if 4 bytes smaller (size of the union above).
|
||||
*/
|
||||
uint8_t payload[];
|
||||
};
|
||||
} __packed __aligned(4);
|
||||
|
||||
int copier_ipcgtw_process(const struct ipc4_ipcgtw_cmd *cmd,
|
||||
void *reply_payload, uint32_t *reply_payload_size);
|
||||
|
|
Loading…
Reference in New Issue