diff options
| author | 2026-08-03 23:11:49 +0200 | |
|---|---|---|
| committer | 2026-08-07 16:41:01 -0700 | |
| commit | 4d8e0becfd341d749b8c4f51ac6d758f2ecd55c0 (patch) | |
| tree | 4fbf77abd34f37795726ae1011d19f569dd04761 /scripts/Makefile.thinlto | |
| parent | Merge branch 'net-dsa-mt7530-fix-remaining-swallowed-mdio-access-errors' (diff) | |
net: niu: fix potential buffer overflow/truncation in irq names
Building with W=1 reports a -Wformat-truncation warning on
niu_set_irq_name(): the "%s:SYSERR" format could be truncated
because irq_name[] was one byte too small for the worst case
interface name length (IFNAMSIZ-1) plus the ":SYSERR" suffix.
Increase the irq_name buffer size to account for the suffix and
replace the remaining sprintf() calls in the same function with
snprintf() to avoid possible buffer overflows.
Tested:
- Built the kernel with W=1 and confirmed the warning is no longer reported.
- No NIU hardware was available for runtime testing.
Signed-off-by: Ronan Marchal <ronanmarchal29@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260803211149.10585-1-ronanmarchal29@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
