Closed GustavoARSilva closed 9 months ago
Found in x86 with allyesconfig (GCC 13):
drivers/leds/trigger/ledtrig-netdev.c: In function 'set_device_name': drivers/leds/trigger/ledtrig-netdev.c:234:34: warning: array subscript 17 is above array bounds of 'char[16]' [-Warray-bounds=] 234 | trigger_data->device_name[size] = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/leds/trigger/ledtrig-netdev.c:52:14: note: while referencing 'device_name' 52 | char device_name[IFNAMSIZ]; | ^~~~~~~~~~~ drivers/leds/trigger/ledtrig-netdev.c:234:34: warning: array subscript 17 is above array bounds of 'char[16]' [-Warray-bounds=] 234 | trigger_data->device_name[size] = 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/leds/trigger/ledtrig-netdev.c:52:14: note: while referencing 'device_name' 52 | char device_name[IFNAMSIZ]; | ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:
233 memcpy(trigger_data->device_name, name, size); @234 trigger_data->device_name[size] = 0;
Fixed in commit 259e33cbb1712a7dd844fc9757661cc47cb0e39b.
Found in x86 with allyesconfig (GCC 13):
drivers/leds/trigger/ledtrig-netdev.c: