Repository navigation
Commit d3bceb8
ipc4: handler-user: leave room for the TLV header in vendor config get
ipc4_get_vendor_config_module_instance() checks that produced_data
plus the host max_length fits in MAILBOX_DSPBOX_SIZE, but the
sof_tlv header is written at produced_data and the getter's output
starts after it. A getter that honours max_length can therefore end
8 bytes past the DSPBOX, and the header write itself goes past it
when produced_data is within 8 bytes of the end. For the first block
of a multi-block get max_length is passed on unbounded while the
output also starts after the header.
Count the header in the multi-TLV bound and clamp the first block
max_length to what is left after the header, so the in/out size a
getter sees is the room it really has.
Signed-off-by: Shrushti P K <shrusthi@labs.digiscrypt.com>1 parent 9c6494b commit d3bceb8
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
787 | 791 | | |
788 | 792 | | |
789 | 793 | | |
| |||
818 | 822 | | |
819 | 823 | | |
820 | 824 | | |
821 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
822 | 828 | | |
823 | 829 | | |
824 | 830 | | |
| |||
0 commit comments