summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-06-13 23:56:22 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-06-13 23:56:22 +0200
commit5a703518d6e338eb150ada6b8af5d1f4e0319b1e (patch)
tree43508595d6b6ebc76e5765078cd7f3a3a82a0046 /linux
parentfb2e83ece3c03b94ad9e9ca75d658729b684a789 (diff)
downloadmediapointer-dvb-s2-5a703518d6e338eb150ada6b8af5d1f4e0319b1e.tar.gz
mediapointer-dvb-s2-5a703518d6e338eb150ada6b8af5d1f4e0319b1e.tar.bz2
gspca: fix NULL pointer deref in query_ctrl
From: Hans de Goede <hdegoede@redhat.com> gspca: fix NULL pointer deref in query_ctrl Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/gspca/gspca.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c
index e6ab4bb8c..f06aac676 100644
--- a/linux/drivers/media/video/gspca/gspca.c
+++ b/linux/drivers/media/video/gspca/gspca.c
@@ -1054,13 +1054,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 {