From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2432037B4; Wed, 27 Feb 2019 11:26:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2019 02:26:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,419,1544515200"; d="scan'208";a="137587051" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga002.jf.intel.com with ESMTP; 27 Feb 2019 02:26:57 -0800 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.86]) by IRSMSX104.ger.corp.intel.com ([169.254.5.56]) with mapi id 14.03.0415.000; Wed, 27 Feb 2019 10:26:56 +0000 From: "Pattan, Reshma" To: "Chaitanya Babu, TalluriX" , "dev@dpdk.org" CC: "Parthasarathy, JananeeX M" , "rmody@marvell.com" , "shshaikh@marvell.com" , "Xing, Beilei" , "Zhang, Qi Z" , "alejandro.lucero@netronome.com" , "De Lara Guarch, Pablo" , "Doherty, Declan" , "stable@dpdk.org" Thread-Topic: [PATCH v3] drivers: fix to replace strcat with strlcat Thread-Index: AQHUzmJASxxCjvEbREmIWCCFCYpjGqXzbvHQ Date: Wed, 27 Feb 2019 10:26:56 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A41A149@irsmsx110.ger.corp.intel.com> References: <1547825033-3595-1-git-send-email-tallurix.chaitanya.babu@intel.com> <1551247371-32624-1-git-send-email-tallurix.chaitanya.babu@intel.com> In-Reply-To: <1551247371-32624-1-git-send-email-tallurix.chaitanya.babu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODllYzFhMTItZmYwZS00NWQ0LTkyYjMtYmYwZDc4NTgwNDQ0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib3FFOTk5S01SNXEzemNwdEs4VUY0SE5wOXU4aVZHMlp5SU1xZHBESWQwaVwvc0dJOUxscnV3emJUa2ZPNThXamUifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] drivers: fix to replace strcat with strlcat X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2019 10:27:00 -0000 > -----Original Message----- > From: Chaitanya Babu, TalluriX > Sent: Wednesday, February 27, 2019 6:03 AM > To: dev@dpdk.org > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethde= v.c > index dca61f03a..fac4e943f 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -12201,8 +12201,10 @@ i40e_update_customized_pctype(struct > rte_eth_dev *dev, uint8_t *pkg, > for (n =3D 0; n < proto_num; n++) { > if (proto[n].proto_id !=3D proto_id) > continue; > - strcat(name, proto[n].name); > - strcat(name, "_"); > + strlcat(name, proto[n].name, > + sizeof(name) - strlen(name) - 1); > + strlcat(name, "_", > + sizeof(name) - strlen(name) - 1); > break; > } > } You need to include rte_string_fns.h here , check the build failure at belo= w link.=20 http://patches.dpdk.org/patch/50535/ In other files the header is included indirectly, but I suggest include thi= s explicitly to avoid any header dependencies . Also, commit message heading should be "fix possible overflow with strlcat"= ?=20 Thanks, Reshma