Re: [PATCH] media: v4l2-ioctl: prevent underflow in v4l_enumoutput()

2018-05-25 Thread Hans Verkuil
On 17/05/18 11:05, Dan Carpenter wrote: > My Smatch allmodconfig build only detects one function implementing > vpbe_device_ops->enum_outputs and that's vpbe_enum_outputs(). The > problem really happens in that function when we do: > > int temp_index = output->index; > > if (temp_ind

[PATCH] media: v4l2-ioctl: prevent underflow in v4l_enumoutput()

2018-05-17 Thread Dan Carpenter
My Smatch allmodconfig build only detects one function implementing vpbe_device_ops->enum_outputs and that's vpbe_enum_outputs(). The problem really happens in that function when we do: int temp_index = output->index; if (temp_index >= cfg->num_outputs) return -EI