From: Mauro Carvalho Chehab Date: Tue, 28 Apr 2015 12:50:36 +0000 (-0300) Subject: [media] cx18: avoid going past input/audio array X-Git-Tag: omap-for-v4.2/fixes-rc1^2~111^2~530 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f9e682d05e27fef1a78b4089cfde818ea109d25;p=pandora-kernel.git [media] cx18: avoid going past input/audio array As reported by smatch: drivers/media/pci/cx18/cx18-driver.c:807 cx18_init_struct2() error: buffer overflow 'cx->card->video_inputs' 6 <= 6 That happens because nof_inputs and nof_audio_inputs can be initialized as CX18_CARD_MAX_VIDEO_INPUTS, instead of CX18_CARD_MAX_VIDEO_INPUTS - 1. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andy Walls Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed