firmware: arm_ffa: Fix memory corruption in ffa_msg_send2()
[linux-2.6-block.git] / drivers / firmware / arm_ffa / driver.c
index 26968edac5b22bc59ebe727a888e41e062a5fdb0..b29496cac2afb56cb474958e6f739b81d109868b 100644 (file)
@@ -363,7 +363,7 @@ static int ffa_msg_send2(u16 src_id, u16 dst_id, void *buf, size_t sz)
        msg->offset = sizeof(*msg);
        msg->send_recv_id = src_dst_ids;
        msg->size = sz;
-       memcpy(msg + msg->offset, buf, sz);
+       memcpy((u8 *)msg + msg->offset, buf, sz);
 
        /* flags = 0, sender VMID = 0 works for both physical/virtual NS */
        invoke_ffa_fn((ffa_value_t){