Commit 0210345
committed
Tools: Testbench: Fix bytes control data validation in tb_send_bytes_data
The change in removing bytes control blob in module init() triggered
an issue in sof-testbench4. It resulted in valgrind fail with
scripts/host-testbench.sh run with error "Invalid read of size 1" in
"memcpy(msg + sizeof(config), (char *)abi->data + offset, chunk_size)".
The invalid read happens when abi->data doesn't have chunk_size bytes
available.
The fix is to skip bytes controls with no private data to avoid
reading garbage abi->size from adjacent topology buffer data, which
causes invalid memory reads in tb_send_bytes_data().
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>1 parent 187b157 commit 0210345
2 files changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1358 | 1358 | | |
1359 | 1359 | | |
1360 | 1360 | | |
1361 | | - | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
1362 | 1364 | | |
1363 | 1365 | | |
1364 | 1366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| |||
0 commit comments