Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3901146imm; Mon, 4 Jun 2018 11:07:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKUbTNqhZ1o6mWnS8VXqAF+ppjIxDGR7IwQIbCiCnmdKceZ6IMd/Za9MsUToDToktldYLg0 X-Received: by 2002:a62:1146:: with SMTP id z67-v6mr12168512pfi.135.1528135654536; Mon, 04 Jun 2018 11:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528135654; cv=none; d=google.com; s=arc-20160816; b=kTBSn3qjkmMrt8SMyU1jdvyJtTgAoxCRjhKuQAW9ej78KD589EgaFiHAy0yLwc7Yuj +pypcGY1CXeyyb7vcUz9HXGBhQU6UImKlSD3IEtFgJcxJdP7j/S1jsKCW8ACLzp6IFJb +enke8LCvvILsq9TxqShQtY2M62r53IFEgenFhgqz+BUBc+w0b6/uG1vDJL02XAST2S0 lzQyD/1rSCi0JjQS1AlBgQWD5VKpKFGCSX3G939kxzAEp7Jn8CH6hYfLU4Rbh9R92NYc sSPBMjUj2uP6i+Pz1CfTXLnV13h6HJiyGRjz3ZSndnmSpMwNZ3phSMCKsAkKUkqZMxrG Dbsw== 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:message-id:subject:cc:to:from:date :arc-authentication-results; bh=9UNDOviXnx0XmWoeXQAI55FQ8JhwSwl6WjuyNBeF18I=; b=M8ySuTUVVVpas+q1ckQuNM9d6MYhEdPpY/b/JwCviWyIKoNYEG9XCejrmaWau9EMCH uhgTnlnoV02uZ6jT4+YTiXf0HG5AovNFZhcBqyiARPjG8vEIa3OpQfZMNmLCjqGTJ2wX Tyt073LLmXKS33ydc6CFIex9tW28vGxZgy11HVtUPXtEwN4xjUcxjNnQiTUgIEiX553I Y19HOGs00v6XCXN+HC95kA0kBZRX7+ZVLsr6t8l++/T4Sf3MV0mUrzfG+26VbwJ6au8O GQ+HogtoUCiGOzi4IDTXPnwb2926CRbKsOPBrIgVFE3KLcJ34LyxzJRlHRsJQg7fytp4 Lk4A== 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 i88-v6si19916617pfa.219.2018.06.04.11.07.19; Mon, 04 Jun 2018 11:07:34 -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 S1751364AbeFDSG4 (ORCPT + 99 others); Mon, 4 Jun 2018 14:06:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:55966 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751274AbeFDSGz (ORCPT ); Mon, 4 Jun 2018 14:06:55 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15E282088F; Mon, 4 Jun 2018 18:06:53 +0000 (UTC) Date: Mon, 4 Jun 2018 14:06:52 -0400 From: Steven Rostedt To: Nick Desaulniers Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, trivial@kernel.org Subject: Re: [PATCH] tracing: prefer strlcpy to strncpy Message-ID: <20180604140652.34f28df7@gandalf.local.home> In-Reply-To: <1527573818-29712-1-git-send-email-nick.desaulniers@gmail.com> References: <1527573818-29712-1-git-send-email-nick.desaulniers@gmail.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 May 2018 23:03:38 -0700 Nick Desaulniers wrote: > Fixes a stringop-truncation warning from gcc-8. > > Signed-off-by: Nick Desaulniers Acked-by: Steven Rostedt (VMware) -- Steve > --- > kernel/trace/trace_events_hist.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c > index b9061ed..b53a6c0 100644 > --- a/kernel/trace/trace_events_hist.c > +++ b/kernel/trace/trace_events_hist.c > @@ -393,7 +393,7 @@ static void hist_err_event(char *str, char *system, char *event, char *var) > else if (system) > snprintf(err, MAX_FILTER_STR_VAL, "%s.%s", system, event); > else > - strncpy(err, var, MAX_FILTER_STR_VAL); > + strlcpy(err, var, MAX_FILTER_STR_VAL); > > hist_err(str, err); > }