From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id D45F84C8F for ; Tue, 8 May 2018 07:05:43 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Tue, 08 May 2018 12:30:23 +0800 Message-ID: <152575382339.56689.12045698620547357806.stgit@localhost.localdomain> In-Reply-To: <152575364588.56689.3300796065057551728.stgit@localhost.localdomain> References: <152575364588.56689.3300796065057551728.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [PATCH 11/18] drivers:net:sfc: fix strncpy length 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: , X-List-Received-Date: Tue, 08 May 2018 05:05:44 -0000 --- drivers/net/sfc/sfc_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index e42d55350..e9bb283e0 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -742,7 +742,7 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev, char *name = xstats_names[nb_written++].name; strncpy(name, efx_mac_stat_name(sa->nic, i), - sizeof(xstats_names[0].name)); + sizeof(xstats_names[0].name) - 1); name[sizeof(xstats_names[0].name) - 1] = '\0'; }