From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 939F3A0555 for ; Fri, 10 Jun 2022 15:58:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8CFAE427F9; Fri, 10 Jun 2022 15:58:20 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 3201B40689; Fri, 10 Jun 2022 15:58:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654869498; x=1686405498; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=k0shUpWDBKl6S/ZsEl2EMbgBvf4d3TnJYOqHDtbLuDM=; b=Vzkzi+JbN7IueXC2//xAvL1MmQDTDXFa+wDkOlB/MrMaPaFGxzwpnar9 V0PACdcz6RTvPjZkgBhN5KHGjOp+1SsxT2r4JgqO1gcMFcrthDuqc80I8 LN+b2uhri0eGWJDFL6eEKEoj5XV8vKR2PSMjFIUb8DAUu+i8OtiXO77/9 8FnR/tl4AbqPnEd5PDnnbsZMyH69oHV9vXEOlQF7agnz3h96S7rg4lUB3 U2OpE5VzPhQ+mWYjq8pRKCG9uZMyeMyG0UY33aP8BobUwWdhzikCKb3fu +jaT9dwhK7ngV03guFLnqJA3HBtOTLALGZRh2TBxi+OylYe+ccCyuD69S A==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="339386984" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="339386984" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 06:54:05 -0700 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="828265504" Received: from bricha3-mobl.ger.corp.intel.com ([10.55.133.106]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 10 Jun 2022 06:54:04 -0700 Date: Fri, 10 Jun 2022 14:54:01 +0100 From: Bruce Richardson To: David Marchand Cc: dev@dpdk.org, stable@dpdk.org, Matan Azrad , Viacheslav Ovsiienko , Michael Baum , Ophir Munk Subject: Re: [PATCH] net/mlx5: fix build with clang 14 Message-ID: References: <20220518091100.1182494-1-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220518091100.1182494-1-david.marchand@redhat.com> X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Wed, May 18, 2022 at 11:11:00AM +0200, David Marchand wrote: > clang 14 raises the following warning: > > ../drivers/net/mlx5/linux/mlx5_ethdev_os.c:1137:52: error: 'fscanf' > may overflow; destination buffer in argument 3 has size 16, but the > corresponding specifier may require size 17 > [-Werror,-Wfortify-source] > ret = fscanf(file, "%" RTE_STR(IF_NAMESIZE) "s", > port_name); > > Extend port_name so that it can fit a null terminated string. > > Fixes: 63d1db710fbc ("net/mlx5: fix unlimited parsing of switch info") > Fixes: 1256805dd54d ("net/mlx5: move Linux-specific functions") > Cc: stable@dpdk.org > > Signed-off-by: David Marchand > --- > drivers/net/mlx5/linux/mlx5_ethdev_os.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Seeing this error with Ubuntu 22.04, and this patch fixes the issue. Tested-by: Bruce Richardson Acked-by: Bruce Richardson