Re: [iproute PATCH 05/51] iplink_can: Prevent overstepping array bounds

2017-08-15 Thread Phil Sutter
On Tue, Aug 15, 2017 at 08:10:49AM -0700, Stephen Hemminger wrote: > On Sat, 12 Aug 2017 14:04:24 +0200 > Phil Sutter wrote: > > > can_state_names array contains at most CAN_STATE_MAX fields, so allowing > > an index to it to be equal to that number is wrong. While here, also > >

Re: [iproute PATCH 05/51] iplink_can: Prevent overstepping array bounds

2017-08-15 Thread Stephen Hemminger
On Sat, 12 Aug 2017 14:04:24 +0200 Phil Sutter wrote: > can_state_names array contains at most CAN_STATE_MAX fields, so allowing > an index to it to be equal to that number is wrong. While here, also > make sure the array is indeed that big so nothing bad happens if > CAN_STATE_MAX

[iproute PATCH 05/51] iplink_can: Prevent overstepping array bounds

2017-08-12 Thread Phil Sutter
can_state_names array contains at most CAN_STATE_MAX fields, so allowing an index to it to be equal to that number is wrong. While here, also make sure the array is indeed that big so nothing bad happens if CAN_STATE_MAX ever increases. Signed-off-by: Phil Sutter ---