Skip to content

Commit

Permalink
ipc3: fix subsize check
Browse files Browse the repository at this point in the history
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 <cujomalainey@chromium.org>
  • Loading branch information
cujomalainey authored and kv2019i committed Aug 28, 2024
1 parent 8b8c842 commit 94b3d2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ipc/ipc3/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 94b3d2c

Please sign in to comment.