Alexey Kodanev
ab748dd10d
bna: adjust 'name' buf size of bna_tcb and bna_ccb structures
...
[ Upstream commit c9741a03dc8e491e57b95fba0058ab46b7e506da ]
To have enough space to write all possible sprintf() args. Currently
'name' size is 16, but the first '%s' specifier may already need at
least 16 characters, since 'bnad->netdev->name' is used there.
For '%d' specifiers, assume that they require:
* 1 char for 'tx_id + tx_info->tcb[i]->id' sum, BNAD_MAX_TXQ_PER_TX is 8
* 2 chars for 'rx_id + rx_info->rx_ctrl[i].ccb->id', BNAD_MAX_RXP_PER_RX
is 16
And replace sprintf with snprintf.
Detected using the static analysis tool - Svace.
Fixes: 8b230ed8ec ("bna: Brocade 10Gb Ethernet device driver")
Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com >
Reviewed-by: Simon Horman <horms@kernel.org >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2024-08-03 08:49:09 +02:00
..
2024-06-12 11:02:55 +02:00
2024-07-25 09:49:08 +02:00
2024-05-25 16:21:34 +02:00
2024-07-05 09:31:59 +02:00
2024-02-16 19:06:26 +01:00
2024-07-11 12:47:17 +02:00
2024-07-25 09:49:11 +02:00
2024-07-11 12:47:14 +02:00
2024-04-13 13:05:16 +02:00
2024-07-11 12:47:10 +02:00
2024-07-18 13:18:39 +02:00
2024-07-11 12:47:16 +02:00
2024-04-03 15:19:44 +02:00
2024-04-27 17:07:14 +02:00
2024-07-05 09:31:53 +02:00
2024-08-03 08:48:58 +02:00
2024-04-13 13:04:54 +02:00
2024-07-11 12:47:04 +02:00
2024-03-01 13:26:31 +01:00
2024-02-05 20:12:47 +00:00
2024-06-27 13:46:20 +02:00
2024-06-12 11:03:55 +02:00
2024-08-03 08:48:52 +02:00
2024-06-12 11:03:41 +02:00
2024-05-17 11:56:16 +02:00
2024-08-03 08:49:03 +02:00
2024-06-12 11:03:39 +02:00
2024-07-25 09:49:15 +02:00
2024-08-03 08:48:55 +02:00
2024-06-21 14:36:00 +02:00
2024-07-25 09:49:11 +02:00
2024-05-17 11:56:08 +02:00
2024-08-03 08:48:56 +02:00
2024-06-21 14:35:58 +02:00
2024-07-18 13:18:44 +02:00
2024-06-16 13:41:41 +02:00
2024-07-05 09:31:54 +02:00
2024-07-11 12:47:05 +02:00
2024-07-25 09:49:14 +02:00
2024-06-12 11:03:35 +02:00
2024-06-27 13:46:17 +02:00
2024-07-05 09:31:57 +02:00
2024-03-26 18:20:52 -04:00
2024-06-12 11:03:14 +02:00
2024-02-05 20:12:58 +00:00
2024-08-03 08:48:52 +02:00
2024-07-11 12:47:16 +02:00
2024-08-03 08:48:58 +02:00
2024-05-25 16:21:30 +02:00
2024-07-25 09:49:12 +02:00
2024-07-05 09:31:53 +02:00
2024-08-03 08:48:58 +02:00
2024-08-03 08:49:09 +02:00
2024-07-11 12:47:18 +02:00
2024-03-26 18:20:49 -04:00
2024-08-03 08:48:55 +02:00
2024-07-18 13:18:40 +02:00
2024-07-25 09:49:20 +02:00
2024-08-03 08:48:58 +02:00
2024-01-31 16:16:59 -08:00
2024-01-20 11:50:11 +01:00
2024-06-27 13:46:17 +02:00
2024-07-25 09:49:18 +02:00
2024-05-02 16:29:31 +02:00
2024-07-05 09:31:52 +02:00
2024-08-03 08:48:52 +02:00
2024-02-05 20:12:47 +00:00
2024-06-27 13:46:17 +02:00
2024-03-26 18:20:36 -04:00
2024-06-27 13:46:19 +02:00
2024-08-03 08:48:55 +02:00
2024-06-27 13:46:21 +02:00
2024-06-21 14:35:59 +02:00
2024-01-20 11:50:07 +01:00
2024-01-31 16:16:59 -08:00
2024-03-26 18:20:58 -04:00
2024-07-25 09:49:15 +02:00
2024-07-25 09:49:17 +02:00
2024-05-17 11:56:20 +02:00
2024-08-03 08:48:58 +02:00
2024-06-12 11:03:34 +02:00
2024-08-03 08:48:52 +02:00
2024-06-21 14:35:55 +02:00
2024-06-12 11:03:35 +02:00
2024-05-17 11:56:07 +02:00
2024-07-25 09:49:17 +02:00
2024-06-16 13:41:33 +02:00
2024-06-21 14:35:44 +02:00
2024-07-11 12:47:09 +02:00
2024-06-12 11:03:33 +02:00
2024-05-17 11:56:08 +02:00
2024-07-18 13:18:39 +02:00
2024-07-05 09:31:48 +02:00
2024-05-17 11:56:23 +02:00
2024-04-17 11:18:27 +02:00
2024-06-16 13:41:36 +02:00
2024-06-12 11:03:30 +02:00
2024-06-12 11:03:52 +02:00
2024-06-16 13:41:39 +02:00
2024-06-12 11:03:53 +02:00