diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-10-10 21:16:12 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-22 14:05:18 -0700 |
commit | 6d3c6d8e4e1160df23405b45b6b5b01f5b91bcb1 (patch) | |
tree | b0777f4e77fcf04777359bfec9f24d32d14a3f6b | |
parent | fd8ceb79314d7ff2c580b4ac4db716134c647641 (diff) | |
download | linux-stable-6d3c6d8e4e1160df23405b45b6b5b01f5b91bcb1.tar.gz linux-stable-6d3c6d8e4e1160df23405b45b6b5b01f5b91bcb1.tar.bz2 linux-stable-6d3c6d8e4e1160df23405b45b6b5b01f5b91bcb1.zip |
security: avoid calling a NULL function pointer in drivers/video/tvaudio.c
commit 5ba2f67afb02c5302b2898949ed6fc3b3d37dcf1 upstream
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: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/media/video/tvaudio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c index 01ebcec040c4..db55c5c6d208 100644 --- a/drivers/media/video/tvaudio.c +++ b/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 */ |