From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dumitrescu, Cristian" Subject: Re: [PATCH] examples/ip_pipeline: fix buffer not null terminated. Date: Tue, 8 May 2018 14:27:54 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BB66780@IRSMSX108.ger.corp.intel.com> References: <20180416102614.64971-1-roy.fan.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Singh, Jasvinder" To: "Zhang, Roy Fan" , "dev@dpdk.org" Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A01DA8D95 for ; Tue, 8 May 2018 16:27:59 +0200 (CEST) In-Reply-To: <20180416102614.64971-1-roy.fan.zhang@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Zhang, Roy Fan > Sent: Monday, April 16, 2018 11:26 AM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian ; Singh, Jasvinde= r > > Subject: [PATCH] examples/ip_pipeline: fix buffer not null terminated. >=20 > Coverity issue: 272563 > Fixes: 8245472c58c8 ("examples/ip_pipeline: add sw queue object") >=20 > Signed-off-by: Fan Zhang > --- > examples/ip_pipeline/swq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/examples/ip_pipeline/swq.c b/examples/ip_pipeline/swq.c > index c11bbf27e..be78704c1 100644 > --- a/examples/ip_pipeline/swq.c > +++ b/examples/ip_pipeline/swq.c > @@ -64,7 +64,7 @@ swq_create(const char *name, struct swq_params > *params) > } >=20 > /* Node fill in */ > - strncpy(swq->name, name, sizeof(swq->name)); > + strncpy(swq->name, name, sizeof(swq->name) - 1); > swq->r =3D r; >=20 > /* Node add to list */ > -- > 2.13.6 Acked-by: Cristian.Dumitrescu Applied to next-pipeline tree, thanks!