summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorGeorgios Androutsopoulos <georgeandrout13@gmail.com>2026-09-10 11:38:44 -0400
committerDanilo Krummrich <dakr@kernel.org>2026-09-11 23:03:48 +0200
commita4aaec5580d8fb0b89b03ad7b95f5f52ce2b23e6 (patch)
treeca52d5e87f2d8588de4696346d07ea37c7b960b6 /tools/lib/python/kdoc
parentd3bdf70cf0e862d7f1641522c32e55764cd5b481 (diff)
rust: auxiliary: validate DeviceId name length
`DeviceId::new()` copies `modname` and `name` into the fixed 40-byte `auxiliary_device_id::name` array without checking that they fit. An oversized name is caught by the array bounds check, but the error reports an out-of-bounds index in the copy loop rather than the constraint the caller violated. Check the invariant explicitly instead, so the failure states the length limit rather than an array index. This should only be reached when constructing a device ID table, so the failure is a compile time error. Document that intent. Signed-off-by: Georgios Androutsopoulos <georgeandrout13@gmail.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260910153844.3987791-1-georgeandrout13@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions