From c61e93384741542dcb3c34a182176f3622edd6ba Mon Sep 17 00:00:00 2001 From: Tomasz Lauda Date: Fri, 26 Apr 2019 05:39:21 +0200 Subject: [PATCH] ipc: fix dst size of read in mailbox_validate() Fixes destination size of mailbox_hostbox_read() call in mailbox_validate(). We're starting from some non-zero offset, so the size is smaller than SOF_IPC_MSG_MAX_SIZE. Signed-off-by: Tomasz Lauda --- src/ipc/handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc/handler.c b/src/ipc/handler.c index 6dbb1253b79a..1022ba75258a 100644 --- a/src/ipc/handler.c +++ b/src/ipc/handler.c @@ -141,7 +141,7 @@ static inline struct sof_ipc_cmd_hdr *mailbox_validate(void) } /* read rest of component data */ - mailbox_hostbox_read(hdr + 1, SOF_IPC_MSG_MAX_SIZE, + mailbox_hostbox_read(hdr + 1, SOF_IPC_MSG_MAX_SIZE - sizeof(*hdr), sizeof(*hdr), hdr->size - sizeof(*hdr)); dcache_writeback_region(hdr, hdr->size);