diff options
author | 2025-03-18 18:04:29 +0200 | |
---|---|---|
committer | 2025-04-15 17:57:55 +0100 | |
commit | ee44a1def7ee4c6f9f04a02bfa1a106ee41434d3 (patch) | |
tree | 67e12444691872025a7224214919da8d295fb0c0 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | leds: led-triggers: Improvements for default trigger (diff) | |
download | linux-rng-ee44a1def7ee4c6f9f04a02bfa1a106ee41434d3.tar.xz linux-rng-ee44a1def7ee4c6f9f04a02bfa1a106ee41434d3.zip |
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 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions