DPDK patches and discussions
 help / color / mirror / Atom feed
From: Steve Yang <stevex.yang@intel.com>
To: dev@dpdk.org
Cc: qiming.yang@intel.com, qi.z.zhang@intel.com,
	Steve Yang <stevex.yang@intel.com>
Subject: [PATCH v1] net/ice: fix format overflow warning for meson build
Date: Thu, 20 Oct 2022 03:21:01 +0000	[thread overview]
Message-ID: <20221020032101.1932275-1-stevex.yang@intel.com> (raw)

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


             reply	other threads:[~2022-10-20  3:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20  3:21 Steve Yang [this message]
2022-10-20  5:02 ` Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221020032101.1932275-1-stevex.yang@intel.com \
    --to=stevex.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).