提交 b8bfb5fb 编写于 作者: H Hans de Goede 提交者: Mauro Carvalho Chehab

V4L/DVB (12071): gspca: fix NULL pointer deref in query_ctrl

gspca: fix NULL pointer deref in query_ctrl
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 14422f9d
......@@ -1042,13 +1042,11 @@ static int vidioc_queryctrl(struct file *file, void *priv,
for (i = 0; i < gspca_dev->sd_desc->nctrls; i++) {
if (gspca_dev->ctrl_dis & (1 << i))
continue;
if (ctrls->qctrl.id < id)
if (gspca_dev->sd_desc->ctrls[i].qctrl.id < id)
continue;
if (ctrls != NULL) {
if (gspca_dev->sd_desc->ctrls[i].qctrl.id
if (ctrls && gspca_dev->sd_desc->ctrls[i].qctrl.id
> ctrls->qctrl.id)
continue;
}
continue;
ctrls = &gspca_dev->sd_desc->ctrls[i];
}
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册