diff options
| author | Zichen Xie <[email protected]> | 2024-10-22 17:19:08 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-10-29 18:43:01 +0000 |
| commit | 4ce1f56a1eaced2523329bef800d004e30f2f76c (patch) | |
| tree | 7ae1a0e5c8a94e7a25ddd9a95a390f93e1c0c6ec /net/sched/cls_api.c | |
| parent | net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT (diff) | |
| download | kernel-4ce1f56a1eaced2523329bef800d004e30f2f76c.tar.gz kernel-4ce1f56a1eaced2523329bef800d004e30f2f76c.zip | |
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 <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/sched/cls_api.c')
0 files changed, 0 insertions, 0 deletions
