Re: [PATCH] tvp5150: avoid going past array on v4l2_querymenu()

2018-09-14 Thread Marco Felsch
On 18-09-13 18:36, Mauro Carvalho Chehab wrote: > The parameters of v4l2_ctrl_new_std_menu_items() are tricky: instead of > the number of possible values, it requires the number of the maximum > value. In other words, the ARRAY_SIZE() value should be decremented, > otherwise it will go past the arr

[PATCH] tvp5150: avoid going past array on v4l2_querymenu()

2018-09-13 Thread Mauro Carvalho Chehab
The parameters of v4l2_ctrl_new_std_menu_items() are tricky: instead of the number of possible values, it requires the number of the maximum value. In other words, the ARRAY_SIZE() value should be decremented, otherwise it will go past the array bounds, as warned by KASAN: [ 279.839688] BUG: KASA