From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id 8117F1B899 for ; Tue, 15 May 2018 15:53:49 +0200 (CEST) Received: by mail-wr0-f195.google.com with SMTP id p4-v6so253484wrh.3 for ; Tue, 15 May 2018 06:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OfkLAq0R/yfcluuuSM+5KihOU/taBNWg9ALOXWFRV7o=; b=LM2vHAefbTu/Wp95vWhqARGmLibPqajFrOes9zJ7Udt0ka4sa+y6gTHBxxkmdJ2MuG nsdYuLTno1bi8p3XYSSvDExCmJ51I1G2jGVdm07+35wUKHLf23PC6soSuQpYKK1VssD5 n2kOMVXy5Mgte255MxmuC9oYnCKDoZaKkiOAJYuNbgDZ+NjUWJl6pyx6ewodDX3cTHpH djDNU3IYeusLrSQ2wEl7H+pDOzul66XzAGtgzA1yEYniu52B2rrlT5v3/4HlyGweitF0 dnVIWDbb52zHxtGC0xKaQmUQDJcM/CS0bFTinZnlYigsP+4yFbxNM2gOxUQbv3pAqEN7 x3Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OfkLAq0R/yfcluuuSM+5KihOU/taBNWg9ALOXWFRV7o=; b=uBomHbsoDTRcJ5KQbsRN9NYdVBoXVTISijgmHyOkD3fzzhWWHz5E4Lgrhav3OQTmg8 HTPzznwA4HgeT7e23n6qfJxGPryt4GjZ09P0WIAZfffK3wBPsetifQbGEB2j801DE2ad bwKDfDZFH8O/t0p5libahSy76v5NeSK6FjTvKpRoQ5RnCqF3AluWepMEOX4BQjALVay/ k3mZtqoxJcZxWdkjxHLS2uFcZJCcc4OI9UrsGEZsvnFGYRWVjXog7sXByZgmp9CWHqpJ PBUq7RkPeORxdCxkleDTQdf2LyJZtfCUXP9DHlsEQ8HZFyHYd9wiOFuIQFMjJpL2nSU0 bq2g== X-Gm-Message-State: ALKqPwe9M3S0e7qUKMnYkgeTlPP2eEgYUCnIaGL8pp2KknNjoKsmKrHY KuubFtvWii89xnPxzl39duQ= X-Google-Smtp-Source: AB8JxZpwmKpQ1AJPG7nEL49mz9xAPyH6r+OijOK64vs5lfHFbEi2NIcbym6g6mCvC5h/IFi7gPBRBA== X-Received: by 2002:adf:9607:: with SMTP id b7-v6mr9975141wra.129.1526392428753; Tue, 15 May 2018 06:53:48 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id 4-v6sm670943wmg.40.2018.05.15.06.53.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:53:47 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Ferruh Yigit , dpdk stable Date: Tue, 15 May 2018 14:53:34 +0100 Message-Id: <20180515135335.10459-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515135335.10459-1-luca.boccassi@gmail.com> References: <20180515134731.9337-72-luca.boccassi@gmail.com> <20180515135335.10459-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'app/bbdev: use strcpy for allocated string' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 13:53:49 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From ac04624478cb9bbb1e7a9c659f9b22fae74a73e2 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 14 May 2018 13:01:07 +0800 Subject: [PATCH] app/bbdev: use strcpy for allocated string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit f2790f9cf8486b01576c6ddfd60d2ce434a2b3e4 ] app/test-bbdev/test_bbdev_vector.c:895:3: error: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] strncpy(entry, line, strlen(line)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ app/test-bbdev/test_bbdev_vector.c:917:5: error: ‘strncat’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] strncat(entry, line, strlen(line)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev") Signed-off-by: Andy Green Reviewed-by: Ferruh Yigit --- app/test-bbdev/test_bbdev_vector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-bbdev/test_bbdev_vector.c b/app/test-bbdev/test_bbdev_vector.c index addef0572..5b694dd90 100644 --- a/app/test-bbdev/test_bbdev_vector.c +++ b/app/test-bbdev/test_bbdev_vector.c @@ -889,8 +889,7 @@ test_bbdev_vector_read(const char *filename, goto exit; } - memset(entry, 0, strlen(line) + 1); - strncpy(entry, line, strlen(line)); + strcpy(entry, line); /* check if entry ends with , or = */ if (entry[strlen(entry) - 1] == ',' @@ -912,7 +911,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; -- 2.14.2