DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mcnamara, John" <john.mcnamara@intel.com>
To: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size	buffer defect
Date: Fri, 11 Dec 2015 16:27:48 +0000	[thread overview]
Message-ID: <B27915DBBA3421428155699D51E4CFE20240372F@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <1449849702-30365-1-git-send-email-roy.fan.zhang@intel.com>

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> Sent: Friday, December 11, 2015 4:02 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size
> buffer defect
> 
> Coverity issue: 107133
> Fixes: eb32fe7c5574 ("examples/ip_pipeline: rework initialization
> parameters")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> ---
> *v2
> fixed bug: fix possible buff not null terminated bug
> 
>  examples/ip_pipeline/init.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
> index bc6d6d9..cabc4f7 100644
> --- a/examples/ip_pipeline/init.c
> +++ b/examples/ip_pipeline/init.c
> @@ -1068,7 +1068,8 @@ static void app_pipeline_params_get(struct
> app_params *app,
>  	uint32_t i;
>  	uint32_t mempool_id;
> 
> -	strcpy(p_out->name, p_in->name);
> +	strncpy(p_out->name, p_in->name, PIPELINE_NAME_SIZE);
> +	p_out->name[PIPELINE_NAME_SIZE - 1] = '\0';

Hi Fan,

The Patch title should have v2 in it but from a code point of view:

Acked-by: John McNamara <john.mcnamara@intel.com>

  reply	other threads:[~2015-12-11 16:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 16:01 Fan Zhang
2015-12-11 16:27 ` Mcnamara, John [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-11 11:29 [dpdk-dev] [PATCH] example/ip_pipeline: fix buffer size warning Fan Zhang
2015-12-11 11:29 ` [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size buffer defect Fan Zhang
2015-12-11 15:37   ` Mcnamara, John
2015-12-11 16:16     ` Richardson, Bruce

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=B27915DBBA3421428155699D51E4CFE20240372F@IRSMSX103.ger.corp.intel.com \
    --to=john.mcnamara@intel.com \
    --cc=dev@dpdk.org \
    --cc=roy.fan.zhang@intel.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).