diff options
author | Andy Walls <awalls@radix.net> | 2009-07-23 20:51:29 -0400 |
---|---|---|
committer | Andy Walls <awalls@radix.net> | 2009-07-23 20:51:29 -0400 |
commit | 54a9310128f01c9c97607d99f52ced91e050e834 (patch) | |
tree | c6b4dc4b70c4ea1727463600fb92672001f832a6 /linux/drivers/media/video | |
parent | f1f1d841250e56e65222123f52c87e33f58d2e87 (diff) | |
download | mediapointer-dvb-s2-54a9310128f01c9c97607d99f52ced91e050e834.tar.gz mediapointer-dvb-s2-54a9310128f01c9c97607d99f52ced91e050e834.tar.bz2 |
cx18: Read buffer overflow
From: Andy Walls <awalls@radix.net>
This mistakenly tested against sizeof(freqs) instead of the array size. Due to
the mask the only illegal value possible was 3.
Reported-by: Roel Kluin <roel.kluin@gmail.com>
Priority: high
Signed-off-by: Andy Walls <awalls@radix.net>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/cx18/cx18-controls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-controls.c b/linux/drivers/media/video/cx18/cx18-controls.c index 5136df198..93f0dae01 100644 --- a/linux/drivers/media/video/cx18/cx18-controls.c +++ b/linux/drivers/media/video/cx18/cx18-controls.c @@ -20,6 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA */ +#include <linux/kernel.h> #include "cx18-driver.h" #include "cx18-cards.h" @@ -317,7 +318,7 @@ int cx18_s_ext_ctrls(struct file *file, void *fh, struct v4l2_ext_controls *c) idx = p.audio_properties & 0x03; /* The audio clock of the digitizer must match the codec sample rate otherwise you get some very strange effects. */ - if (idx < sizeof(freqs)) + if (idx < ARRAY_SIZE(freqs)) cx18_call_all(cx, audio, s_clock_freq, freqs[idx]); return err; } |