From: Kalle Valo <kvalo@kernel.org>
To: Kalle Valo <kvalo@kernel.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/3] wifi: brcmfmac: fix format-truncation warnings
Date: Mon, 23 Oct 2023 17:25:17 +0000 (UTC) [thread overview]
Message-ID: <169808191584.695306.1796980160191200158.kvalo@kernel.org> (raw)
In-Reply-To: <20231012135854.3473332-1-kvalo@kernel.org>
Kalle Valo <kvalo@kernel.org> wrote:
> On v6.6-rc4 with GCC 13.2 I see:
>
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:262:52: warning: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size 4 [-Wformat-truncation=]
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:262:46: note: directive argument in the range [0, 65535]
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:262:46: note: directive argument in the range [0, 65535]
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:262:9: note: 'snprintf' output between 9 and 17 bytes into a destination of size 9
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:265:55: warning: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size 4 [-Wformat-truncation=]
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:265:48: note: directive argument in the range [0, 65535]
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:265:48: note: directive argument in the range [0, 65535]
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:265:9: note: 'snprintf' output between 10 and 18 bytes into a destination of size 10
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:342:50: warning: '/' directive output may be truncated writing 1 byte into a region of size between 0 and 4 [-Wformat-truncation=]
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:342:42: note: directive argument in the range [0, 65535]
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c:342:9: note: 'snprintf' output between 10 and 18 bytes into a destination of size 10
>
> Fix these by increasing the buffer sizes to 20 bytes to make sure there's enough space.
>
> Compile tested only.
>
> Signed-off-by: Kalle Valo <kvalo@kernel.org>
3 patches applied to wireless-next.git, thanks.
fab22496c982 wifi: brcmfmac: fix format-truncation warnings
c253e43e1078 wifi: ipw2x00: fix format-truncation warnings
359342795d62 wifi: ath9k_htc: fix format-truncation warning
--
https://patchwork.kernel.org/project/linux-wireless/patch/20231012135854.3473332-1-kvalo@kernel.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2023-10-23 17:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 13:58 [PATCH 1/3] wifi: brcmfmac: fix format-truncation warnings Kalle Valo
2023-10-12 13:58 ` [PATCH 2/3] wifi: ipw2x00: " Kalle Valo
2023-10-12 13:58 ` [PATCH 3/3] wifi: ath9k_htc: fix format-truncation warning Kalle Valo
2023-10-23 17:25 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=169808191584.695306.1796980160191200158.kvalo@kernel.org \
--to=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).