Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5955859ybi; Wed, 29 May 2019 00:03:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVSyuh2JndP5SNgNBqNFap6CVqcAu1cf046UcaTT0H/DRUV6c/LOkNOpAALfEQfdf/TNFC X-Received: by 2002:a17:90a:1aa8:: with SMTP id p37mr10411953pjp.17.1559113418303; Wed, 29 May 2019 00:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559113418; cv=none; d=google.com; s=arc-20160816; b=hIYjnjUu8jqWtLtFiJdJCkYidRswcFUx7dc+Uess6KLVcjVbDgEeLu2RTYJC1D9e/k 9u5L3beWhl3xknIudklNiT6e1KnIEoGcMpoZgA+fT6wv3iX5ILramau8rmex7yG7t84v DdWIRjXUZaXmx/pKmDOkWVaSYT+gr1LOZHZm0vQCbKsS0n4DWM7StRW973ManTKUb0zG 43f1D/wIpBOTI7f471hpMf81VdURQyOQtYbvaG6p40qeZpTt/mPlmi2VUnhzHzo5AnQL km5m3zDh4A6hY47qWQrkpbwkTgw5U6RKXFudHZFmwfpIO3ksC1bMFH1X+gEGuJXb+rvB nIng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=ddmMnE0eTdg+bMDUe2tjQBvYOiB6qr24sLwVJI/Hvko=; b=MB1fZuyueAd6zXvcKwIuB1NyA0EbC85DBrykPgHr8t3w9n3hZHw0H7/I8hMxO2f8sh +mdqtjdx4c1Yov0b+eELOw4mCTc8erofmA5swYf4CMXaviqu2rpdSDyYe2JJQ4O5I5mv h+1KLTQMY4CGTuKfzuOCy0rW1H26jcVbWfSkfMp/0CgsW/Xrwz60vtwhP4O//CXzpLrA emOc9xNY0hmkWHWFMl/wU5/cV0g/iBXSwX8lQr2CCE8Mg2WeoWODndc22mPsEVcSLOjO kv5Q5fuYmbQfgqKaWt3vE5M1eRdTa5RryO34a+H+Fy9p6gutnsqVujF+iiKHPuYZr3iV jouw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i195si28192940pfe.20.2019.05.29.00.03.21; Wed, 29 May 2019 00:03:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbfE2HBz (ORCPT + 99 others); Wed, 29 May 2019 03:01:55 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:58410 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbfE2HBy (ORCPT ); Wed, 29 May 2019 03:01:54 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 537A61478A00B; Wed, 29 May 2019 00:01:54 -0700 (PDT) Date: Wed, 29 May 2019 00:01:53 -0700 (PDT) Message-Id: <20190529.000153.1480129500988688576.davem@davemloft.net> To: gustavo@embeddedor.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] macvlan: Replace strncpy() by strscpy() From: David Miller In-Reply-To: <20190527183855.GA32553@embeddedor> References: <20190527183855.GA32553@embeddedor> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 29 May 2019 00:01:54 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Gustavo A. R. Silva" Date: Mon, 27 May 2019 13:38:55 -0500 > The strncpy() function is being deprecated. Replace it by the safer > strscpy() and fix the following Coverity warning: > > "Calling strncpy with a maximum size argument of 16 bytes on destination > array ifrr.ifr_ifrn.ifrn_name of size 16 bytes might leave the destination > string unterminated." > > Notice that, unlike strncpy(), strscpy() always null-terminates the > destination string. > > Addresses-Coverity-ID: 1445537 ("Buffer not null terminated") > Signed-off-by: Gustavo A. R. Silva Applied.