From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v6 15/16] app/test-bbdev: strcpy ok for allocated string Date: Mon, 14 May 2018 21:42:51 +0100 Message-ID: <6b056fee-11a8-45d3-33e9-bb4c946cfc8f@intel.com> References: <152627394448.52758.15834703911138407294.stgit@localhost.localdomain> <152627406736.52758.1036851396439121779.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Andy Green , dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 151051CBBA for ; Mon, 14 May 2018 22:42:55 +0200 (CEST) In-Reply-To: <152627406736.52758.1036851396439121779.stgit@localhost.localdomain> 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" On 5/14/2018 6:01 AM, Andy Green wrote: > Signed-off-by: Andy Green > Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") > Cc: stable@dpdk.org > --- > app/test-bbdev/test_bbdev_vector.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c > index a37e35f4d..c574f2135 100644 > --- a/app/test-bbdev/test_bbdev_vector.c > +++ b/app/test-bbdev/test_bbdev_vector.c > @@ -892,7 +892,7 @@ test_bbdev_vector_read(const char *filename, > } > > memset(entry, 0, strlen(line) + 1); > - strncpy(entry, line, strlen(line)); > + strcpy(entry, line); agreed that according above code strcpy is OK but still why change it? Is this fixing a build error? > > /* check if entry ends with , or = */ > if (entry[strlen(entry) - 1] == ',' >