diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-10 21:16:12 -0700 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-10 21:16:12 -0700 |
commit | f41c4cd9c72ad4735d27445c0b0dbe1a3cb25cfc (patch) | |
tree | 41fa11a8c24ee6a4c18c1d5d3abbddaa298442a4 /linux/drivers/media/video | |
parent | 0d1d720c6adb0f1d7eba935c7d843c9a0a287f28 (diff) | |
download | mediapointer-dvb-s2-f41c4cd9c72ad4735d27445c0b0dbe1a3cb25cfc.tar.gz mediapointer-dvb-s2-f41c4cd9c72ad4735d27445c0b0dbe1a3cb25cfc.tar.bz2 |
security: avoid calling a NULL function pointer in drivers/video/tvaudio.c
From: Arjan van de Ven <arjan@linux.intel.com>
NULL function pointers are very bad security wise. This one got caught by
kerneloops.org quite a few times, so it's happening in the field....
Fix is simple, check the function pointer for NULL, like 6 other places
in the same function are already doing.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/tvaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index 53ece95db..7e670f2bc 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -1804,7 +1804,7 @@ static int chip_command(struct i2c_client *client, break; case VIDIOC_S_FREQUENCY: chip->mode = 0; /* automatic */ - if (desc->checkmode) { + if (desc->checkmode && desc->setmode) { desc->setmode(chip,V4L2_TUNER_MODE_MONO); if (chip->prevmode != V4L2_TUNER_MODE_MONO) chip->prevmode = -1; /* reset previous mode */ |