Re: [PATCH 08/14] avoid going past input/audio array

2015-04-28 Thread Andy Walls
On April 28, 2015 11:43:47 AM EDT, Mauro Carvalho Chehab mche...@osg.samsung.com wrote: As reported by smatch: drivers/media/pci/ivtv/ivtv-driver.c:832 ivtv_init_struct2() error: buffer overflow 'itv-card-video_inputs' 6 = 6 That happens because nof_inputs and nof_audio_inputs can be

[PATCH 08/14] avoid going past input/audio array

2015-04-28 Thread Mauro Carvalho Chehab
As reported by smatch: drivers/media/pci/ivtv/ivtv-driver.c:832 ivtv_init_struct2() error: buffer overflow 'itv-card-video_inputs' 6 = 6 That happens because nof_inputs and nof_audio_inputs can be initialized as IVTV_CARD_MAX_VIDEO_INPUTS, instead of IVTV_CARD_MAX_VIDEO_INPUTS - 1.