DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mokhtar, Amr" <amr.mokhtar@intel.com>
To: "Parthasarathy, JananeeX M" <jananeex.m.parthasarathy@intel.com>,
	"Yigit,  Ferruh" <ferruh.yigit@intel.com>,
	"Poornima, PallantlaX" <pallantlax.poornima@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Pattan, Reshma" <reshma.pattan@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] app/testbbdev: fix sprintf with snprintf
Date: Fri, 15 Feb 2019 11:30:05 +0000	[thread overview]
Message-ID: <3D3765A8CDB52A4C8B410430AA19CB237094D522@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <7AE31235A30B41498D1C31348DC858BD5B533CD2@IRSMSX103.ger.corp.intel.com>


> -----Original Message-----
> From: Parthasarathy, JananeeX M
> Sent: Friday 15 February 2019 11:08
> To: Yigit, Ferruh <ferruh.yigit@intel.com>; Poornima, PallantlaX
> <pallantlax.poornima@intel.com>; dev@dpdk.org
> Cc: Pattan, Reshma <reshma.pattan@intel.com>; Mokhtar, Amr
> <amr.mokhtar@intel.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] app/testbbdev: fix sprintf with snprintf
> 
> Hi
> 
> >-----Original Message-----
> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ferruh Yigit
> >Sent: Friday, February 08, 2019 7:44 PM
> >To: Poornima, PallantlaX <pallantlax.poornima@intel.com>;
> dev@dpdk.org
> >Cc: Pattan, Reshma <reshma.pattan@intel.com>; Mokhtar, Amr
> ><amr.mokhtar@intel.com>; stable@dpdk.org
> >Subject: Re: [dpdk-dev] [PATCH] app/testbbdev: fix sprintf with snprintf
> >
> >On 2/4/2019 7:15 AM, Pallantla Poornima wrote:
> >> @@ -825,7 +825,7 @@
> >>
> >>  test_bbdev_driver_init(void)
> >>
> >> TEST_ASSERT_FAIL(rte_bbdev_release(NULL),
> >> "Failed to uninitialize bbdev driver with NULL bbdev");
> >> - sprintf(name_tmp, "%s", "invalid_name");
> >> + snprintf(name_tmp, sizeof(name_tmp), "%s", "invalid_name");
> >> dev2 = rte_bbdev_get_named_dev(name_tmp);
> >> TEST_ASSERT_FAIL(rte_bbdev_release(dev2),
> >> "Failed to uninitialize bbdev driver with invalid name");
> >
> >Can use strlcpy() instead of snprintf() here.
> 
> Please confirm whether we can do this change (snprintf to strlcpy) as there
> was Ack from other reviewer.

I agree with Ferruh suggestion, as this is a simple string copying.
Feel free to use strlcpy instead and retain my Ack.
Thanks.

> Thanks
> M.P.Jananee

  parent reply	other threads:[~2019-02-15 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04  7:15 Pallantla Poornima
2019-02-08 14:13 ` Ferruh Yigit
     [not found]   ` <7AE31235A30B41498D1C31348DC858BD5B533CD2@IRSMSX103.ger.corp.intel.com>
2019-02-15 11:30     ` Mokhtar, Amr [this message]
2019-02-11 13:35 ` Mokhtar, Amr

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=3D3765A8CDB52A4C8B410430AA19CB237094D522@IRSMSX104.ger.corp.intel.com \
    --to=amr.mokhtar@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jananeex.m.parthasarathy@intel.com \
    --cc=pallantlax.poornima@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=stable@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).