From: Dan Carpenter Date: Thu, 9 Nov 2017 21:28:14 +0000 (-0500) Subject: media: cpia2: Fix a couple off by one bugs X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a95224d7ef3818fb367acc4a6cbdfb30229a8a7;p=pandora-kernel.git media: cpia2: Fix a couple off by one bugs commit d5ac225c7d64c9c3ef821239edc035634e594ec9 upstream. The cam->buffers[] array has cam->num_frames elements so the > needs to be changed to >= to avoid going beyond the end of the array. The ->buffers[] array is allocated in cpia2_allocate_buffers() if you want to confirm. Fixes: ab33d5071de7 ("V4L/DVB (3376): Add cpia2 camera support") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab [bwh: Backported to 3.2: adjust filename] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed