[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACKFLinNsXks-ChG7xhYHFtR=eXBCtVwUviQowXcyJCRb6pX2w@mail.gmail.com>
Date: Fri, 17 Jan 2025 11:48:38 -0800
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
pavan.chebbi@...adcom.com
Subject: Re: [PATCH net-next] eth: bnxt: fix string truncation warning in FW version
On Fri, Jan 17, 2025 at 10:37 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> W=1 builds with gcc 14.2.1 report:
>
> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:4193:32: error: ‘%s’ directive output may be truncated writing up to 31 bytes into a region of size 27 [-Werror=format-truncation=]
> 4193 | "/pkg %s", buf);
>
> It's upset that we let buf be full length but then we use 5
> characters for "/pkg ".
>
> The builds is also clear with clang version 19.1.5 now.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
There is actually more truncation because of the string before "/pkg ".
Since this works,
Reviewed-by: Michael Chan <michael.chan@...adcom.com>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists