From: Thomas Monjalon <thomas@monjalon.net>
To: Michael Santana <msantana@redhat.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
Rasesh Mody <rmody@marvell.com>,
Shahed Shaikh <shshaikh@marvell.com>,
Matan Azrad <matan@mellanox.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Byron Marohn <byron.marohn@intel.com>,
Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>,
Aaron Conole <aconole@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various files
Date: Wed, 29 May 2019 12:51:15 +0200 [thread overview]
Message-ID: <2682254.EQDdmg2fsP@xps> (raw)
In-Reply-To: <20190510145541.GB87@bricha3-MOBL.ger.corp.intel.com>
10/05/2019 16:55, Bruce Richardson:
> On Fri, May 10, 2019 at 10:53:12AM -0400, Michael Santana wrote:
> > snprintf guarantees to always correctly place a null terminator in the buffer
> > string. So manually placing a null terminator in a buffer right after a call
> > to snprintf is redundant code.
> >
> > Additionally, there is no need to use 'sizeof(buffer) - 1' in snprintf as this
> > means we are not using the last character in the buffer. 'sizeof(buffer)' is
> > enough.
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Michael Santana <msantana@redhat.com>
> >
> Looks a good cleanup, thanks.
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks
next prev parent reply other threads:[~2019-05-29 10:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 14:53 Michael Santana
2019-05-10 14:53 ` Michael Santana
2019-05-10 14:55 ` Bruce Richardson
2019-05-10 14:55 ` Bruce Richardson
2019-05-29 10:51 ` Thomas Monjalon [this message]
2019-05-10 15:28 ` Burakov, Anatoly
2019-05-10 15:28 ` Burakov, Anatoly
2019-05-28 13:33 ` Michael Santana Francisco
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=2682254.EQDdmg2fsP@xps \
--to=thomas@monjalon.net \
--cc=aconole@redhat.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=byron.marohn@intel.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=msantana@redhat.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=rmody@marvell.com \
--cc=shshaikh@marvell.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).