summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMikhail Kshevetskiy <[email protected]>2026-02-11 21:22:17 +0300
committerJerome Forissier <[email protected]>2026-03-12 12:49:35 +0100
commit7ad4c7f8cf07bd2206b2baa118ce2ef56f0caf60 (patch)
tree0631ceca5cb70d58c30abfc60c5ff0c400a08ec6 /drivers/net
parent0561b0b25a16c1cae910c29cf3588aa29fc1f0a3 (diff)
net: airoha: avoid out of boundary writing/access to gdm_port_str[] array
In the case of an7581 possible GDM port id are: 1, 2 and 4. Initialization of port GDM4 will lead to out of boundary writing to gdm_port_str[] array. Let's increase the array size by 1 to avoid it. Signed-off-by: Mikhail Kshevetskiy <[email protected]>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/airoha_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/airoha_eth.c b/drivers/net/airoha_eth.c
index 2007642ebae..171fb0825fa 100644
--- a/drivers/net/airoha_eth.c
+++ b/drivers/net/airoha_eth.c
@@ -331,7 +331,7 @@ struct airoha_eth {
struct airoha_eth_soc_data *soc;
struct airoha_qdma qdma[AIROHA_MAX_NUM_QDMA];
- char gdm_port_str[AIROHA_MAX_NUM_GDM_PORTS][AIROHA_GDM_PORT_STRING_LEN];
+ char gdm_port_str[AIROHA_MAX_NUM_GDM_PORTS + 1][AIROHA_GDM_PORT_STRING_LEN];
};
struct airoha_eth_soc_data {