From 3face9fe219b71bd7430752bc08ebc574c33cc1c Mon Sep 17 00:00:00 2001 From: Curtis Malainey Date: Mon, 19 Aug 2024 18:25:27 -0700 Subject: [PATCH] ipc3: fix subsize check The ext size is counted as part of the ipc header size. The process size and header size need to be less than the ipc max size. Signed-off-by: Curtis Malainey --- src/ipc/ipc3/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc/ipc3/helper.c b/src/ipc/ipc3/helper.c index f64f17de7f13..13c1824e627d 100644 --- a/src/ipc/ipc3/helper.c +++ b/src/ipc/ipc3/helper.c @@ -293,7 +293,7 @@ static int comp_specific_builder(struct sof_ipc_comp *comp, if (IPC_TAIL_IS_SIZE_INVALID(*proc)) return -EBADMSG; - if (proc->comp.hdr.size + proc->comp.ext_data_length > SOF_IPC_MSG_MAX_SIZE) + if (proc->comp.hdr.size + proc->size > SOF_IPC_MSG_MAX_SIZE) return -EBADMSG; config->process.type = proc->type;