From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id E99F11BA5D for ; Fri, 11 Jan 2019 19:07:09 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id c123so7314169pfb.0 for ; Fri, 11 Jan 2019 10:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3jy7govgnPBh/UdVsLMdONS7fzcZtfkBNVeTrmXFXdE=; b=ULN4CqzZPb077rzSAHJjvDEwgOdofoQ5zUHqnXWiEizMyfOI1BHQtqkPAxQNXFf+Ma UqOobRadttTYwi8US6fGc7ePbgb/MHLpaUZVmcuysxK3JAHg3ZzCN3uuW20vTcrDxY0L DCnOU3HnPA+J4e91nEwtYqUJc1ZZTKBVpIHqH3aFBkih1OJan28o3GpjrK+qI569c0Yb S8TouDWZTThe/VGdBDeGRccyHgp9vOegXLoQhAaGY2i4lhwuLpFkPno/ZPHdiSDvAmKs iQYLHiFpxh8gm/eoUrAx+VFOP8AQ4UiT2APTlgw4WA+wcMu8QSlywPpFKLBfDFZr1lFk +Nrg== 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=3jy7govgnPBh/UdVsLMdONS7fzcZtfkBNVeTrmXFXdE=; b=iv5c/9xG0+RtlNcCVpbd3NVFfBkHdHLAk9XxR467vbTleoTb1eKjl9ZJgw8Ezflqs7 FWNAt9BJCW93BL/iYmjNnH8aRaHydGShiJ1TPWi1I5wUTwIOs/sbbHoISeRlz6uXfbCc H3A4vo8pi4mtomMYeHt57KPaQmh8Tzu0X7d0t6EtXGSKepbrbpFjq+JZIkvdEbTnPFLa K4O8WGhJLhnzZrTTrRxVz6SbItVq1glGSxchaeJ9SZOKIqCrmy0v/kl+MQoJqtMtEZKz nJY+34uFq6kBMHlUcl94Hg0h1E/b+0e7sKJrfXuXIfmNJV+AButNOU99lokngs1Wg6Um FY9g== X-Gm-Message-State: AJcUukdGbwYqs+PGmwswrdPtHC/IGnF46boLwkNOIeneG3obr+fVjjE0 mRH6HPb67NdTnLqXGZuhlhoNqzQ9WVc= X-Google-Smtp-Source: ALg8bN49PA9cP7Rr1PYFflgQasC3M9VmpLUuGhIKW9mcG85nZ6n8/heBGZwqKdqoLm+JWHMy/svA3w== X-Received: by 2002:a65:47ca:: with SMTP id f10mr14538469pgs.166.1547230028600; Fri, 11 Jan 2019 10:07:08 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id n186sm107213303pfn.137.2019.01.11.10.07.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jan 2019 10:07:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 11 Jan 2019 10:06:54 -0800 Message-Id: <20190111180659.5972-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111180659.5972-1-stephen@networkplumber.org> References: <20190111180659.5972-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/6] net/tap: use strlcpy for interface name 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: Fri, 11 Jan 2019 18:07:10 -0000 snprintf is not needed here, use strlcpy instead. Signed-off-by: Stephen Hemminger --- drivers/net/tap/rte_eth_tap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 0ec030bef63c..1c00681ba0eb 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -148,7 +148,7 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive) */ ifr.ifr_flags = (pmd->type == ETH_TUNTAP_TYPE_TAP) ? IFF_TAP : IFF_TUN | IFF_POINTOPOINT; - snprintf(ifr.ifr_name, IFNAMSIZ, "%s", pmd->name); + strlcpy(ifr.ifr_name, pmd->name, IFNAMSIZ); TAP_LOG(DEBUG, "ifr_name '%s'", ifr.ifr_name); -- 2.20.1