diff options
author | Zichen Xie <zichenxie0106@gmail.com> | 2024-10-22 20:19:08 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-10-29 21:43:01 +0300 |
commit | 4ce1f56a1eaced2523329bef800d004e30f2f76c (patch) | |
tree | 7ae1a0e5c8a94e7a25ddd9a95a390f93e1c0c6ec /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 2e95c4384438adeaa772caa560244b1a2efef816 (diff) | |
download | linux-4ce1f56a1eaced2523329bef800d004e30f2f76c.tar.xz |
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: c6385c0b67c5 ("netdevsim: Allow reporting activity on nexthop buckets")
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20241022171907.8606-1-zichenxie0106@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions