summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-03-18 19:04:29 +0300
committerLee Jones <lee@kernel.org>2025-04-15 19:57:55 +0300
commitee44a1def7ee4c6f9f04a02bfa1a106ee41434d3 (patch)
tree67e12444691872025a7224214919da8d295fb0c0 /scripts/lib
parent06d99fcf1f87d5b6bf1c7dd0f7ec422304a47f31 (diff)
downloadlinux-ee44a1def7ee4c6f9f04a02bfa1a106ee41434d3.tar.xz
leds: core: Bail out when composed name can't fit the buffer
GCC compiler complains about snprintf() calls that may potentially cut the output: drivers/leds/led-core.c:551:78: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] drivers/leds/led-core.c:554:78: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] ... Fix these by checking for the potential overflow. This requires to align all the branches to use the same callee, i.e. snprintf(), otherwise the code will be blown up and return different error codes for the different branches. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250318160524.2979982-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'scripts/lib')
0 files changed, 0 insertions, 0 deletions