Commit 4ce1f56a authored by Zichen Xie's avatar Zichen Xie Committed by Jakub Kicinski
Browse files

netdevsim: Add trailing zero to terminate the string in nsim_nexthop_bucket_activity_write()



This was found by a static analyzer.
We should not forget the trailing zero after copy_from_user()
if we will further do some string operations, sscanf() in this
case. Adding a trailing zero will ensure that the function
performs properly.

Fixes: c6385c0b ("netdevsim: Allow reporting activity on nexthop buckets")
Signed-off-by: default avatarZichen Xie <zichenxie0106@gmail.com>
Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20241022171907.8606-1-zichenxie0106@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 2e95c438
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment