DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andy Green <andy@warmcat.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 4/4] net/bnx2x: solve overruns
Date: Fri, 11 May 2018 09:51:32 +0800	[thread overview]
Message-ID: <152600349254.53624.4703994482576123777.stgit@localhost.localdomain> (raw)
In-Reply-To: <152600339444.53624.14086407337377549776.stgit@localhost.localdomain>


---
 drivers/net/bnx2x/bnx2x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index bfd9cce51..3892934cc 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -170,10 +170,10 @@ bnx2x_dma_alloc(struct bnx2x_softc *sc, size_t size, struct bnx2x_dma *dma,
 
 	dma->sc = sc;
 	if (IS_PF(sc))
-		sprintf(mz_name, "bnx2x%d_%s_%" PRIx64, SC_ABS_FUNC(sc), msg,
+		snprintf(mz_name, sizeof(mz_name), "bnx2x%d_%s_%" PRIx64, SC_ABS_FUNC(sc), msg,
 			rte_get_timer_cycles());
 	else
-		sprintf(mz_name, "bnx2x%d_%s_%" PRIx64, sc->pcie_device, msg,
+		snprintf(mz_name, sizeof(mz_name), "bnx2x%d_%s_%" PRIx64, sc->pcie_device, msg,
 			rte_get_timer_cycles());
 
 	/* Caller must take care that strlen(mz_name) < RTE_MEMZONE_NAMESIZE */

  parent reply	other threads:[~2018-05-11  1:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11  1:51 [dpdk-dev] [PATCH 0/4] GCC8 fixes for MLX4/5/BNX2X PMD Andy Green
2018-05-11  1:51 ` [dpdk-dev] [PATCH 1/4] net/bnx2x: do not cast function pointers as a policy Andy Green
2018-05-11 16:03   ` Ferruh Yigit
2018-05-12  0:25     ` Andy Green
2018-05-11 16:33   ` De Lara Guarch, Pablo
2018-05-11  1:51 ` [dpdk-dev] [PATCH 2/4] net/bnx2x: remove unmeetable comparison Andy Green
2018-05-11 16:32   ` De Lara Guarch, Pablo
2018-05-11 18:10     ` Stephen Hemminger
2018-05-12  1:04       ` Andy Green
2018-05-11  1:51 ` [dpdk-dev] [PATCH 3/4] net/mlx5: solve var may be used uninitialized Andy Green
2018-05-11 16:25   ` De Lara Guarch, Pablo
2018-05-13  4:45   ` Shahaf Shuler
2018-05-13  5:25     ` Andy Green
2018-05-11  1:51 ` Andy Green [this message]
2018-05-11 16:21   ` [dpdk-dev] [PATCH 4/4] net/bnx2x: solve overruns De Lara Guarch, Pablo
2018-05-11 16:04 ` [dpdk-dev] [PATCH 0/4] GCC8 fixes for MLX4/5/BNX2X PMD Ferruh Yigit

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=152600349254.53624.4703994482576123777.stgit@localhost.localdomain \
    --to=andy@warmcat.com \
    --cc=dev@dpdk.org \
    /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).