summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorPengpeng Hou <pengpeng@iscas.ac.cn>2026-04-03 09:55:12 +0300
committerVinod Koul <vkoul@kernel.org>2026-05-03 19:30:08 +0300
commit45c7bda7b7440183850012153988e40b300f40d0 (patch)
tree1243b91242506baefd088a979e3f69bdab4be0d1 /scripts/basic
parentbe6d8daaab654e9b0a8508757534d556d399d0cd (diff)
downloadlinux-45c7bda7b7440183850012153988e40b300f40d0.tar.xz
soundwire: validate DT compatible before parsing it
`sdw_of_find_slaves()` fetches raw `"compatible"` bytes with `of_get_property()` and then immediately parses them with `sscanf("sdw%01x%04hx%04hx%02hhx", ...)`. Live-tree OF properties are stored as raw bytes plus a separate length; they are not globally guaranteed to be NUL-terminated. Validate the first compatible string before parsing it. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Link: https://patch.msgid.link/20260403183504.4-soundwire-compatible-pengpeng@iscas.ac.cn Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions