Commit 9f39959
committed
audio: module_adapter_ipc4: add range check to module_get_large_config()
In a multi-block get case, if the host sends data_off_size > md->cfg.size,
the calculation of the last fragment size is incorrect if a sufficiently
large value is passed.
Add validation to catch this case and return an error data_off_size is too
large.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>1 parent 3f7738d commit 9f39959
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
269 | 280 | | |
| 281 | + | |
270 | 282 | | |
271 | 283 | | |
272 | 284 | | |
| |||
0 commit comments