aboutsummaryrefslogtreecommitdiffstats
path: root/tools/net/ynl/generated/devlink-user.c
diff options
context:
space:
mode:
authorGerhard Engleder <[email protected]>2023-10-23 18:38:56 +0000
committerJakub Kicinski <[email protected]>2023-10-24 20:05:28 +0000
commit00e984cb986b31e9313745e51daceaa1e1eb7351 (patch)
tree985d73291b57e2eb6fde6fd4ad822588d224adff /tools/net/ynl/generated/devlink-user.c
parentMerge branch 'net-deduplicate-netdev-name-allocation' (diff)
downloadkernel-00e984cb986b31e9313745e51daceaa1e1eb7351.tar.gz
kernel-00e984cb986b31e9313745e51daceaa1e1eb7351.zip
tsnep: Fix tsnep_request_irq() format-overflow warning
Compiler warns about a possible format-overflow in tsnep_request_irq(): drivers/net/ethernet/engleder/tsnep_main.c:884:55: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=] sprintf(queue->name, "%s-rx-%d", name, ^ drivers/net/ethernet/engleder/tsnep_main.c:881:55: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=] sprintf(queue->name, "%s-tx-%d", name, ^ drivers/net/ethernet/engleder/tsnep_main.c:878:49: warning: '-txrx-' directive writing 6 bytes into a region of size between 5 and 25 [-Wformat-overflow=] sprintf(queue->name, "%s-txrx-%d", name, ^~~~~~ Actually overflow cannot happen. Name is limited to IFNAMSIZ, because netdev_name() is called during ndo_open(). queue_index is single char, because less than 10 queues are supported. Fix warning with snprintf(). Additionally increase buffer to 32 bytes, because those 7 additional bytes were unused anyway. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Gerhard Engleder <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/net/ynl/generated/devlink-user.c')
0 files changed, 0 insertions, 0 deletions