media: vivid: set min width/height to a value > 0
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 29 Oct 2018 17:32:38 +0000 (13:32 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 23 Nov 2018 11:06:42 +0000 (06:06 -0500)
commit9729d6d282a6d7ce88e64c9119cecdf79edf4e88
treec97ee137362e2cd3a172f2f911c76bac60923e18
parent701f49bc028edb19ffccd101997dd84f0d71e279
media: vivid: set min width/height to a value > 0

The capture DV timings capabilities allowed for a minimum width and
height of 0. So passing a timings struct with 0 values is allowed
and will later cause a division by zero.

Ensure that the width and height must be >= 16 to avoid this.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: syzbot+57c3d83d71187054d56f@syzkaller.appspotmail.com
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vivid/vivid-vid-common.c