From patchwork Fri May 11 01:46:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 39784 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D0D81C0A2; Fri, 11 May 2018 03:46:52 +0200 (CEST) Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 14FE41BC62 for ; Fri, 11 May 2018 03:46:50 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Fri, 11 May 2018 09:46:46 +0800 Message-ID: <152600320633.53146.1883908043976158624.stgit@localhost.localdomain> In-Reply-To: <152600304856.53146.9681482138854493833.stgit@localhost.localdomain> References: <152600304856.53146.9681482138854493833.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Subject: [dpdk-dev] [PATCH v4 18/18] app/test-bbdev: strcpy ok for allocated string 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Andy Green --- app/test-bbdev/test_bbdev_vector.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c index c574f2135..4a3ddcffe 100644 --- a/app/test-bbdev/test_bbdev_vector.c +++ b/app/test-bbdev/test_bbdev_vector.c @@ -914,7 +914,8 @@ test_bbdev_vector_read(const char *filename, } entry = entry_extended; - strncat(entry, line, strlen(line)); + /* entry has been allocated accordingly */ + strcpy(&entry[strlen(entry)], line); if (entry[strlen(entry) - 1] != ',') break;