Commit fef310e
committed
tlv: guard tlv_value_get() loop against NULL from tlv_next()
Add 'tlv &&' to the while-loop condition in tlv_value_get().
tlv_next() returns NULL on malformed TLV (length not a multiple of 4).
The existing condition '(uint32_t)tlv < end_addr' does not catch NULL,
causing a NULL dereference on the next iteration.
This is reachable from host IPC via copier_host_create() which parses
optional TLV data appended to the copier module configuration blob.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>1 parent b06121a commit fef310e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
0 commit comments