From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E1E905F21; Thu, 1 Nov 2018 18:45:57 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Nov 2018 10:45:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,452,1534834800"; d="scan'208";a="87886485" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by orsmga006.jf.intel.com with SMTP; 01 Nov 2018 10:45:53 -0700 Received: by (sSMTP sendmail emulation); Thu, 01 Nov 2018 17:45:50 +0000 Date: Thu, 1 Nov 2018 17:45:50 +0000 From: Bruce Richardson To: Stephen Hemminger Cc: Ferruh Yigit , Thomas Monjalon , Hemant Agrawal , Shreyansh Jain , dev@dpdk.org, stable@dpdk.org Message-ID: <20181101174550.GA23396@bricha3-MOBL.ger.corp.intel.com> References: <20181101131951.91459-1-ferruh.yigit@intel.com> <20181101104231.1a4c1d72@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181101104231.1a4c1d72@xeon-e3> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH 1/2] bus/dpaa: fix build with gcc 9.0 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: Thu, 01 Nov 2018 17:45:58 -0000 On Thu, Nov 01, 2018 at 10:42:31AM -0700, Stephen Hemminger wrote: > On Thu, 1 Nov 2018 13:19:50 +0000 > Ferruh Yigit wrote: > > > build error: > > In function ‘fman_if_init’, > > .../drivers/bus/dpaa/base/fman/fman.c:186:2: > > error: ‘strncpy’ output may be truncated copying 4095 bytes from a > > string of length 4095 [-Werror=stringop-truncation] > > strncpy(__if->node_path, dpa_node->full_name, PATH_MAX - 1); > > > > strncpy may result a not null-terminated string, > > replaced it with rte_strscpy > > > > Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations") > > Cc: stable@dpdk.org > > > > Signed-off-by: Ferruh Yigit > > Maybe just use strlcpy instead of a DPDK specific function. > That way if Gcc gets smarter it can check that as well. +1 While I get the point of strscpy, if strlcpy is good enough for openbsd, it's good enough for me! :-)