From: john miller <john.miller@atomicrules.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Shepard Siegel <shepard.siegel@atomicrules.com>,
ed.czeck@atomicrules.com
Subject: Re: [dpdk-dev] [PATCH] net/ark: fix for Coverity issues
Date: Sat, 13 May 2017 07:28:34 -0400 [thread overview]
Message-ID: <F438D761-2AFA-40B7-A9DF-E98558FCC49C@atomicrules.com> (raw)
In-Reply-To: <cfce47e2-a26f-abba-ea6a-1b295feb03e9@intel.com>
Hi Ferruh,
Thank you for your review.
I will create a new patchset for these fixes with all of the changes you requested.
-John
> On May 12, 2017, at 7:11 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 5/11/2017 12:02 PM, John Miller wrote:
>> Fixes: 9c7188a68d7b ("net/ark: provide API for hardware modules pktchkr and pktgen")
>> Coverity issue: 144513
>>
>> Fixes: 727b3fe292bc ("net/ark: integrate PMD")
>> Coverity issue: 144514
>>
>> Fixes: 9c7188a68d7b ("net/ark: provide API for hardware modules pktchkr and pktgen")
>> Coverity issue: 144512
>>
>> Fixes: 1131cbf0fb2b ("net/ark: stub PMD for Atomic Rules Arkville")
>> Coverity issue: 144517
>
> The convention is Coverity line first, Fixes line later.
>
>>
>> Fixes: 727b3fe292bc ("net/ark: integrate PMD")
>> Coverity issue: 144520
>
> Hi John,
>
> Thanks for fixing coverity issues.
>
> Can you please split patch into a patchset with multiple patches,
> grouped to same kind of fixes?
>
> And instead of having "coverity fix" in patch title, can you please
> describe what is really fixed, like "fix not null terminated buffer" or
> "fix missing function return check" etc ...
>
> Thanks,
> ferruh
>
>> Signed-off-by: John Miller <john.miller@atomicrules.com>
>
> <...>
>
>> --- a/drivers/net/ark/ark_pktgen.c
>> +++ b/drivers/net/ark/ark_pktgen.c
>> @@ -354,7 +354,8 @@ struct OPTIONS {
>> o->v.INT = atoll(val);
>> break;
>> case OTSTRING:
>> - strncpy(o->v.STR, val, ARK_MAX_STR_LEN);
>> + strncpy(o->v.STR, val, ARK_MAX_STR_LEN - 1);
>> + o->v.STR[ARK_MAX_STR_LEN - 1] = 0;
>
> This also works, but you can prefer to switch snprintf(), which
> guaranties the null termination.
>
>> break;
>> }
>> return 1;
>>
>
prev parent reply other threads:[~2017-05-13 11:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 11:02 John Miller
2017-05-12 11:11 ` Ferruh Yigit
2017-05-13 11:28 ` john miller [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=F438D761-2AFA-40B7-A9DF-E98558FCC49C@atomicrules.com \
--to=john.miller@atomicrules.com \
--cc=dev@dpdk.org \
--cc=ed.czeck@atomicrules.com \
--cc=ferruh.yigit@intel.com \
--cc=shepard.siegel@atomicrules.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).