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 5C1431BB46 for ; Fri, 11 Jan 2019 21:35:29 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id z9so7479016pfi.2 for ; Fri, 11 Jan 2019 12:35:29 -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=fXsIIUSHwakajLsU/G+RAUZOz0ohfGrcrhU/SB5pqpM=; b=qVDTaJmnBimEWno01XIjtDG8jykM8DOi7gB42DsMXikvdzwe5N5A8mJ11vZ7VM70oA LnbNmwvznhqatmMoAcomFyw80VzrAP/DTmOGMn8USeo3ild5hIuWw81XtL8km+7Obwc6 eGy5HYboNAd7K/7igE15ExQCeKhIw2b7IdfYAMJzyQ52YBwW30qE7IWQ55ekXwvmZ/Ff oN3cBX0seXzhvSahna2yPLugk0+iLnJYkxaHmntkfvPvR0pseu/oPm2ecI03tqScjKda 7vW0xqTi3uDz+y9qIT3I2MoeZvWRWvvXKdfsttUjbo26nL4V0oNPwNKEi+yAe/W8SZuH tF8g== 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=fXsIIUSHwakajLsU/G+RAUZOz0ohfGrcrhU/SB5pqpM=; b=WtqIPtx/EOfwO9/+gDMPxFW1s8ThfhjFahuz05gaCvK0DJM8xavlsu+iWq1q5Fotki yAYsSVDD1uoHrd9tE6IN/4PWWeNezbmx9CDAYLs+HloMiTtqmUAz/qkKVFuNx0GjK6fN zORdlTd9VyRw0XUnqeIFjuEoOe8ia2qYDwKC2W25UDGIEa06l9qUUJqDak/eWqphL+Wm 1uYCF//EUkMsGWdD5Zvqfs+9VmJTFOY4KCZRDL8ynxeUiBE1SZEh4ZFI2DRlm3DtJN+g EI24oiNFDG3gbbyzYOjfrDkX/z0JySK+DvKsPvvARQpBehlBvUGvKciQY7DZ6wKSLD4S u9VQ== X-Gm-Message-State: AJcUukdpCM652wHHNBWInNRFVxvXCTAv24n6w2tnnvL2EJqzhAyYbOZ4 kHBeS70vNQYWcgsvhd6wDDrYxw== X-Google-Smtp-Source: ALg8bN6HzsRHH8dGlvCVD1ZWyQifPtyoGnlAnqF7XS3TfMcQJmpI7q5xJNwsWAEGcYzSDVDgik3C9g== X-Received: by 2002:a63:9d05:: with SMTP id i5mr13602436pgd.98.1547238928461; Fri, 11 Jan 2019 12:35:28 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id f32sm96610438pgf.80.2019.01.11.12.35.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jan 2019 12:35:27 -0800 (PST) From: Stephen Hemminger To: keith.wiles@intel.com Cc: dev@dpdk.org, Stephen Hemminger Date: Fri, 11 Jan 2019 12:35:14 -0800 Message-Id: <20190111203520.19944-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111203520.19944-1-stephen@networkplumber.org> References: <20190111180659.5972-1-stephen@networkplumber.org> <20190111203520.19944-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/7] 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 20:35:29 -0000 snprintf is not needed here, use strlcpy instead. Signed-off-by: Stephen Hemminger Acked-by Keith Wiles --- 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