diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/media/0034-v4l-Fix-a-use-before-set-in-the-control-framework.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap/media/0034-v4l-Fix-a-use-before-set-in-the-control-framework.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/media/0034-v4l-Fix-a-use-before-set-in-the-control-framework.patch b/extras/recipes-kernel/linux/linux-omap/media/0034-v4l-Fix-a-use-before-set-in-the-control-framework.patch new file mode 100644 index 00000000..adf8b4d4 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap/media/0034-v4l-Fix-a-use-before-set-in-the-control-framework.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From d887b7e4224fa03f080ab6ede038eee8aac4c221 Mon Sep 17 00:00:00 2001 | ||
2 | From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
3 | Date: Tue, 7 Dec 2010 12:57:25 +0100 | ||
4 | Subject: [PATCH 34/43] v4l: Fix a use-before-set in the control framework | ||
5 | |||
6 | v4l2_queryctrl sets the step value based on the control type. That would | ||
7 | be fine if it used the control type stored in the V4L2 kernel control | ||
8 | object, not the one stored in the userspace ioctl structure that has | ||
9 | just been memset to 0. Fix this. | ||
10 | |||
11 | Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
12 | Acked-by: Hans Verkuil <hverkuil@xs4all.nl> | ||
13 | --- | ||
14 | drivers/media/video/v4l2-ctrls.c | 2 +- | ||
15 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
16 | |||
17 | diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c | ||
18 | index 9d2502c..5f74fec 100644 | ||
19 | --- a/drivers/media/video/v4l2-ctrls.c | ||
20 | +++ b/drivers/media/video/v4l2-ctrls.c | ||
21 | @@ -1338,7 +1338,7 @@ int v4l2_queryctrl(struct v4l2_ctrl_handler *hdl, struct v4l2_queryctrl *qc) | ||
22 | qc->minimum = ctrl->minimum; | ||
23 | qc->maximum = ctrl->maximum; | ||
24 | qc->default_value = ctrl->default_value; | ||
25 | - if (qc->type == V4L2_CTRL_TYPE_MENU) | ||
26 | + if (ctrl->type == V4L2_CTRL_TYPE_MENU) | ||
27 | qc->step = 1; | ||
28 | else | ||
29 | qc->step = ctrl->step; | ||
30 | -- | ||
31 | 1.6.6.1 | ||
32 | |||