Skip to contentSkip to conversation

net/ice: fix format overflow warning for meson build

PATCH In review Steve Yang 2 participants 2 messages Oct 20, 2022 Network drivers

lore
Share & tools
lore

Steve Yang

author
#0 lore raw

PATCH 1/1 net/ice: fix format overflow warning for meson build

‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]

Enlarge string size to avoid this warning.

Fixes f2a3245e7aec ("net/ice: support ddp dump switch rule binary")
---
 drivers/net/ice/ice_ddp_package.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ice/ice_ddp_package.c +1 -1
index b881fa3ded..a27a4a2da2 100644
@@ -445,7 +445,7 @@ ice_dump_switch(struct rte_eth_dev *dev, uint8_t **buff2, uint32_t *size)
 	hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
 	/* table index string format: "0000:" */
-	#define TBL_IDX_STR_SIZE  6
+	#define TBL_IDX_STR_SIZE 7
 	for (i = 0; i < ICE_BLK_MAX_COUNT; i++) {
 		int res;
 		uint16_t buff_size;
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines

-----Original Message-----
From: Yang, SteveX <[email protected]>
Sent: Thursday, October 20, 2022 11:21 AM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; Yang, SteveX <[email protected]>
Subject: [PATCH v1] net/ice: fix format overflow warning for meson build

Quoted 8 lines

‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]

Enlarge string size to avoid this warning.

Fixes f2a3245e7aec ("net/ice: support ddp dump switch rule binary")

Squashed into below patch on dpdk-next-net-intel.
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/

Thanks
Qi