DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] net/ice: fix format overflow warning for meson build
@ 2022-10-20  3:21 Steve Yang
  2022-10-20  5:02 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Yang @ 2022-10-20  3:21 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, qi.z.zhang, Steve Yang

‘__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")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
 drivers/net/ice/ice_ddp_package.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ddp_package.c b/drivers/net/ice/ice_ddp_package.c
index b881fa3ded..a27a4a2da2 100644
--- a/drivers/net/ice/ice_ddp_package.c
+++ b/drivers/net/ice/ice_ddp_package.c
@@ -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;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH v1] net/ice: fix format overflow warning for meson build
  2022-10-20  3:21 [PATCH v1] net/ice: fix format overflow warning for meson build Steve Yang
@ 2022-10-20  5:02 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2022-10-20  5:02 UTC (permalink / raw)
  To: Yang, SteveX, dev; +Cc: Yang, Qiming



> -----Original Message-----
> From: Yang, SteveX <stevex.yang@intel.com>
> Sent: Thursday, October 20, 2022 11:21 AM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; Yang, SteveX <stevex.yang@intel.com>
> Subject: [PATCH v1] 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")
> 
> Signed-off-by: Steve Yang <stevex.yang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Squashed into below patch on dpdk-next-net-intel.
https://patchwork.dpdk.org/project/dpdk/patch/20221018064736.1727193-1-stevex.yang@intel.com/

Thanks
Qi



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-20  5:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20  3:21 [PATCH v1] net/ice: fix format overflow warning for meson build Steve Yang
2022-10-20  5:02 ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).