From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 31C598E7B for ; Fri, 11 Dec 2015 17:27:51 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 11 Dec 2015 08:27:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,414,1444719600"; d="scan'208";a="11613627" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga004.fm.intel.com with ESMTP; 11 Dec 2015 08:27:49 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.13]) by irsmsx110.ger.corp.intel.com ([169.254.15.163]) with mapi id 14.03.0248.002; Fri, 11 Dec 2015 16:27:48 +0000 From: "Mcnamara, John" To: "Zhang, Roy Fan" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size buffer defect Thread-Index: AQHRNC1/15oNBzFuq0GEJLH3mM7RT57F+NvQ Date: Fri, 11 Dec 2015 16:27:48 +0000 Message-ID: References: <1449849702-30365-1-git-send-email-roy.fan.zhang@intel.com> In-Reply-To: <1449849702-30365-1-git-send-email-roy.fan.zhang@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size buffer defect X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:27:51 -0000 > -----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 >=20 > Coverity issue: 107133 > Fixes: eb32fe7c5574 ("examples/ip_pipeline: rework initialization > parameters") >=20 > Signed-off-by: Fan Zhang > Acked-by: Cristian Dumitrescu > --- > *v2 > fixed bug: fix possible buff not null terminated bug >=20 > examples/ip_pipeline/init.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > 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; >=20 > - strcpy(p_out->name, p_in->name); > + strncpy(p_out->name, p_in->name, PIPELINE_NAME_SIZE); > + p_out->name[PIPELINE_NAME_SIZE - 1] =3D '\0'; Hi Fan, The Patch title should have v2 in it but from a code point of view: Acked-by: John McNamara