Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7358360ybi; Mon, 8 Jul 2019 20:14:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqylbQSUswZhNgJvpBoNHSFcGS59jn/SKxj7si+9arWUJ6ECwhbaC3qLstUS95slxoVB7to1 X-Received: by 2002:a17:902:24b:: with SMTP id 69mr27861479plc.250.1562642085413; Mon, 08 Jul 2019 20:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562642085; cv=none; d=google.com; s=arc-20160816; b=Ho8MqgEOfg4eEg7Tw4KrAvc7ei2mXyaBOwtWTLOkDI69/LzkUHZMxnQIy1ACZ16izQ Ge77I7bf9aonfBxfGEgtgxCQmXgJxQHC8wU7JNOjO0rhct4VwnKYxc4k7ImxYZdEPhXh wxEzf2kSISaogEb4+8GtQXxuPQ6zfCod9IsWwyxWdbShRUpZe6keyH9lEB+N5fB2NkIf Xt/at19fwswfvnCdOPgbynmyX+YV7OqbscqcnuoqqKXPh2b7xC2ODgxNjk0LXJiJhp+7 BOGbIDKXFHD8Up4g8IyJ5CMpk7L1Xyqm70y+oQgKvHnpn0sMKXsqMHRuxhqfSmSfGByq 9pxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Gf/EuwzDUlmf5XQTtJEnuIZylN3SfSa+z+1LvTKM75k=; b=Ta19v6yOyPu/aJhi5IFO7M3k/LTBSmAntpnR7NmLxz+VFJrDhqQJCp5KjvZUChdrZ7 qzAtEJy1xi1bH+cbXRd0z75jPjbfICqMytSTnsOr7Qwtw+DiIkGMrA/yO0GTnUA6h1X0 Ao5MaUyVQBKivPOrvwcA8L5QBKB4zThpwq1M+qtDQvYD9KKSA637xrs3lcA3oY/1+KA0 8hZQ8Df8NdRH/+tMs4mtjYXXK1V9BQSVUfgipN8m626HcvzNJw2x+d1IORVUCXDhXoRm HCXBIIos8x9d4PTkZKuGuXaZhPVfsqBefjxURPlrJFVA43j/9UWYaFtGM1BGGRH9wyv0 UO2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-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 80si22762577pgf.5.2019.07.08.20.14.19; Mon, 08 Jul 2019 20:14:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725941AbfGIDOF (ORCPT + 99 others); Mon, 8 Jul 2019 23:14:05 -0400 Received: from fieldses.org ([173.255.197.46]:38332 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725905AbfGIDOF (ORCPT ); Mon, 8 Jul 2019 23:14:05 -0400 Received: by fieldses.org (Postfix, from userid 2815) id B01192013; Mon, 8 Jul 2019 23:14:04 -0400 (EDT) Date: Mon, 8 Jul 2019 23:14:04 -0400 From: "J. Bruce Fields" To: Joe Perches Cc: Chuck Lever , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 8/8] nfsd: Fix misuse of strlcpy Message-ID: <20190709031404.GD14439@fieldses.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Jul 04, 2019 at 04:57:48PM -0700, Joe Perches wrote: > Probable cut&paste typo - use the correct field size. Huh, that's been there forever, I wonder why we haven't seen crashes? Oh, I see, name and authname both have the same size. Anyway, makes sense, thanks. Will apply for 5.3. (Unless someone else is getting this; I didn't get copied on the rest of the series.) --b. > > Signed-off-by: Joe Perches > --- > fs/nfsd/nfs4idmap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c > index 2961016097ac..d1f285245af8 100644 > --- a/fs/nfsd/nfs4idmap.c > +++ b/fs/nfsd/nfs4idmap.c > @@ -83,7 +83,7 @@ ent_init(struct cache_head *cnew, struct cache_head *citm) > new->type = itm->type; > > strlcpy(new->name, itm->name, sizeof(new->name)); > - strlcpy(new->authname, itm->authname, sizeof(new->name)); > + strlcpy(new->authname, itm->authname, sizeof(new->authname)); > } > > static void > -- > 2.15.0