Commit b06121a
committed
ipc4: helper: guard TLV loop against NULL from tlv_next()
Add 'tlvs &&' to the for-loop condition in ipc4_find_dma_config_multiple().
tlv_next() returns NULL on malformed TLV (length not a multiple of 4).
The existing loop condition '(uint32_t)tlvs < end_addr' does not catch
NULL (0 < end_addr is always true), causing a NULL pointer dereference
in the next iteration via tlv_value_ptr_get() or tlv_next().
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>1 parent 3c391c6 commit b06121a
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1307 | 1307 | | |
1308 | 1308 | | |
1309 | 1309 | | |
1310 | | - | |
| 1310 | + | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| |||
0 commit comments