On Wed, 21 Feb 2024 11:32:04 +0000, Alexey Kodanev wrote: > 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. > > > [...] Applied, thanks! [1/1] RDMA/rtrs-clt: check strnlen return len in sysfs mpath_policy_store() https://git.kernel.org/rdma/rdma/c/7a7b7f575a25aa Best regards, -- Leon Romanovsky <leon@xxxxxxxxxx>