From: Michael Santana Francisco <msantana@redhat.com>
To: dev@dpdk.org
Cc: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
Rasesh Mody <rmody@marvell.com>,
Shahed Shaikh <shshaikh@marvell.com>,
Matan Azrad <matan@mellanox.com>,
Byron Marohn <byron.marohn@intel.com>,
Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>,
Aaron Conole <aconole@redhat.com>,
Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various files
Date: Tue, 28 May 2019 09:33:17 -0400 [thread overview]
Message-ID: <7dcc3004-3f93-be4d-9643-b37616626cb5@redhat.com> (raw)
In-Reply-To: <48b2d5ee-f6a6-9954-a45b-d2a581c5ace3@intel.com>
On 5/10/19 11:28 AM, Burakov, Anatoly wrote:
> On 10-May-19 3:53 PM, 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>
>> ---
>
> LGTM
>
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
>
ping
prev parent reply other threads:[~2019-05-28 13:33 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
2019-05-10 15:28 ` Burakov, Anatoly
2019-05-10 15:28 ` Burakov, Anatoly
2019-05-28 13:33 ` Michael Santana Francisco [this message]
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=7dcc3004-3f93-be4d-9643-b37616626cb5@redhat.com \
--to=msantana@redhat.com \
--cc=aconole@redhat.com \
--cc=anatoly.burakov@intel.com \
--cc=byron.marohn@intel.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=rmody@marvell.com \
--cc=shshaikh@marvell.com \
--cc=thomas@monjalon.net \
/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).