Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/audio/base_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ __cold static uint32_t basefw_set_system_time(uint32_t param_id, bool first_bloc
if (!(first_block && last_block))
return IPC4_INVALID_REQUEST;

if (data_offset < sizeof(struct ipc4_system_time))
return IPC4_ERROR_INVALID_PARAM;
Comment on lines +280 to +281

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data_offset here is the payload size, not an offset — lyakh confirmed the same in the review. The large-config set path passes the fragment/payload length in this argument (the parameter name is misleading and worth renaming separately), so checking it against sizeof(struct ipc4_system_time) is correct.


global_system_time_info.host_time.val_l = ((const struct ipc4_system_time *)data)->val_l;
global_system_time_info.host_time.val_u = ((const struct ipc4_system_time *)data)->val_u;

Expand Down
Loading