From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] drivers: fix to replace strcat with strncat Date: Tue, 15 Jan 2019 02:53:28 +0100 Message-ID: <4355742.ZHn0J28zhk@xps> References: <1547445875-24601-1-git-send-email-tallurix.chaitanya.babu@intel.com> <20190114142133.GA16996@bricha3-MOBL.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Chaitanya Babu Talluri , reshma.pattan@intel.com, rmody@marvell.com, shshaikh@marvell.com, beilei.xing@intel.com, qi.z.zhang@intel.com, alejandro.lucero@netronome.com, pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, stable@dpdk.org To: Bruce Richardson Return-path: In-Reply-To: <20190114142133.GA16996@bricha3-MOBL.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 14/01/2019 15:21, Bruce Richardson: > On Mon, Jan 14, 2019 at 06:04:35AM +0000, Chaitanya Babu Talluri wrote: > > Strcat does not check the destination length and there might be > > chances of string overflow so insted of strcat, strncat is used. [...] > > While I believe this is correct, this (and the changes below) would be a > lot neater using strlcat function. We should perhaps look to add strlcat > alongside strlcpy for DPDK use. Yes it looks reasonnable.