diff options
author | Alexey Kodanev <[email protected]> | 2024-02-21 11:32:04 +0000 |
---|---|---|
committer | Leon Romanovsky <[email protected]> | 2024-02-25 18:21:42 +0200 |
commit | 7a7b7f575a25aa68ee934ee8107294487efcb3fe (patch) | |
tree | 83ea028cc054c3d7d6f5f87c7129a6e93388cca0 /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 14b526f55ba5916856126f9793309fd6de5c5e7e (diff) |
RDMA/rtrs-clt: Check strnlen return len in sysfs mpath_policy_store()
strnlen() may return 0 (e.g. for "\0\n" string), it's better to
check the result of strnlen() before using 'len - 1' expression
for the 'buf' array index.
Detected using the static analysis tool - Svace.
Fixes: dc3b66a0ce70 ("RDMA/rtrs-clt: Add a minimum latency multipath policy")
Signed-off-by: Alexey Kodanev <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Jack Wang <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions