From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id F38DD2C8 for ; Wed, 23 May 2018 14:11:14 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id x12-v6so21515330wmc.0 for ; Wed, 23 May 2018 05:11:14 -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=kHIHy9t6G/ebNq6CcKV6ABJtj0K+rX3p/d+Uz2qIFv0=; b=J5hTAdBj9lsATVgHfzB/duG1o7ktFvut94J9b0VK6T7g5ADxXNrj81Z8GSjkdL6MG0 hYNYljcRNAnh2GtgcXdl8r7YV/UZJctJr7+QykuI64NKNDNUXOXES5zm79f9J2+iVyMW mBUhpCXwb3/06/kTptkWPZ+kISGzb5HF54cO0G0VPaB9+G4LBdXBlDR9NQOHXhAW0s8j ZUEGSo8SMabIPO1uKbGycMsVgIcBFOa0RI2H0tUsW8hNQXFgFqqhrTmLT61XQX+AeRv1 H4S4F95PKWaPRKKL3QymZXjMUHJFqEbs59zD4plncbgMrydjgamRA1tlBATr5AvggF4t SJ+g== 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=kHIHy9t6G/ebNq6CcKV6ABJtj0K+rX3p/d+Uz2qIFv0=; b=VeScv35bTFwPUNLr9j9Lbu5SnVYycgeYT0hHtP4RLKNY2qjcGAgMQjIEqg0chCDdK5 9rTfy7TSiBaBl1W+PYHrrMtWcpvu31HFDkaL15s2c76Wd/dAgbM6mrTS2teBuOApqTx2 ChbzAH6ZgOA+OuRwSWgATjyjeosALLWBlFqdVCBxVVc4zL2DVierXoRpdXkOLn/x+Aiv OL9SDCwPjcUsLdIDHuGeXCzeKsWstd7W2T40kTZcoBvTd+cHcHCrfkFbs6qX9hBXyyYp KbLOvzBmN5AGA6qshdM3xhUHtWCH75jHJ+P1Uw84CIfksohUmD5gJNRugjgrShk8y4fS WTcA== X-Gm-Message-State: ALKqPwdzITwEeiHfY+BSmU/U7YUTJVMACsRYjJioJqmSkdo0784L5VyS xjvcN6NUv6lCqj6AYadESrt0aYum5s8= X-Google-Smtp-Source: AB8JxZrKqCt4lOliP4Sjl/4N1LQzemk9EPMXH/axaz+N/d+rziFvnWwzF7osRSdDH91xkBqYdQ91xQ== X-Received: by 2002:a1c:2084:: with SMTP id g126-v6mr4826050wmg.52.1527077474719; Wed, 23 May 2018 05:11:14 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id y84-v6sm1877130wmg.44.2018.05.23.05.11.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:11:13 -0700 (PDT) From: luca.boccassi@gmail.com To: Jerin Jacob Cc: Pablo de Lara , dpdk stable Date: Wed, 23 May 2018 13:09:47 +0100 Message-Id: <20180523121010.8385-36-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180523121010.8385-1-luca.boccassi@gmail.com> References: <20180516101323.2234-2-luca.boccassi@gmail.com> <20180523121010.8385-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/crypto-perf: 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: Wed, 23 May 2018 12:11:15 -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/25/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 7e35818f4cf31e46e3f5e4bfd6e985a6fae92015 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Wed, 16 May 2018 17:58:03 +0530 Subject: [PATCH] app/crypto-perf: use strcpy for allocated string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 21f579fcefd3ac21d1894be662f774cf48bb914e ] inlined from ‘cperf_test_vector_get_from_file’ at app/test-crypto-perf/cperf_test_vector_parsing.c:578:11: app/test-crypto-perf/cperf_test_vector_parsing.c:510: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-crypto-perf/cperf_test_vector_parsing.c:528: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)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Found this issue with meson build and gcc 8.1. Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Jerin Jacob Acked-by: Pablo de Lara --- app/test-crypto-perf/cperf_test_vector_parsing.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/test-crypto-perf/cperf_test_vector_parsing.c b/app/test-crypto-perf/cperf_test_vector_parsing.c index 26321d004..92932a230 100644 --- a/app/test-crypto-perf/cperf_test_vector_parsing.c +++ b/app/test-crypto-perf/cperf_test_vector_parsing.c @@ -506,8 +506,7 @@ parse_file(struct cperf_test_vector *vector, struct cperf_options *opts) if (entry == NULL) return -1; - 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] == ',' @@ -524,8 +523,8 @@ parse_file(struct cperf_test_vector *vector, struct cperf_options *opts) if (entry_extended == NULL) goto err; 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