]> git.karo-electronics.de Git - karo-tx-linux.git/commit
V4L: Add check for valid control ID to v4l2_ctrl_next
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 24 Jul 2007 12:07:17 +0000 (08:07 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Aug 2007 21:27:31 +0000 (14:27 -0700)
commit5efb6c65a028869fb9a1eae729a21585be8569cd
treeafb40d6c85fd8db39bcb9488a9146f7b4b541879
parent32b49ec23649cc3e59d8c1963919f159eacd1167
V4L: Add check for valid control ID to v4l2_ctrl_next

If v4l2_ctrl_next is called without the V4L2_CTRL_FLAG_NEXT_CTRL then it
should check whether the passed control ID is valid and return 0 if it
isn't. Otherwise a for-loop over the control IDs will never end.

(cherry picked from commit a46c5fbc6912c4e34cb7ded314249b639dc244a6)

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/v4l2-common.c