Commit d214508
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 0885cc2 commit d214508
2 files changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
| 1289 | + | |
1289 | 1290 | | |
1290 | 1291 | | |
1291 | 1292 | | |
| |||
1358 | 1359 | | |
1359 | 1360 | | |
1360 | 1361 | | |
1361 | | - | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
1362 | 1382 | | |
1363 | 1383 | | |
1364 | 1384 | | |
| |||
| 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