Closed GustavoARSilva closed 1 year ago
Seen under GCC-13
drivers/infiniband/core/user_mad.c:564:50: warning: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Warray-bounds=] drivers/infiniband/core/user_mad.c:566:42: warning: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Warray-bounds=] drivers/infiniband/core/user_mad.c:618:25: warning: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Warray-bounds=] drivers/infiniband/core/user_mad.c:622:44: warning: array subscript ‘struct ib_rmpp_mad[0]’ is partly outside array bounds of ‘unsigned char[140]’ [-Warray-bounds=]
See: https://godbolt.org/z/oYWaGM4Yb
This: https://lore.kernel.org/linux-hardening/ZBo5x5e7B25hHr4F@work/ or that: https://lore.kernel.org/linux-hardening/ZBpB91qQcB10m3Fw@work/
Seen under GCC-13
See: https://godbolt.org/z/oYWaGM4Yb