diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-29 02:00:55 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-30 20:28:58 +0300 |
commit | 322583c410b6206700f5daa98f965b31c99bb8c2 (patch) | |
tree | 0cffb1bd5963acb8cd6493865d35263c2adad85a /drivers | |
parent | 094af36a3a57ddfeb942fd2990f15b570430a81e (diff) | |
download | linux-322583c410b6206700f5daa98f965b31c99bb8c2.tar.xz |
[media] vivid-radio-rx: Don't go past buffer
drivers/media/platform/vivid/vivid-radio-rx.c:198 vivid_radio_rx_s_hw_freq_seek() error: buffer overflow 'vivid_radio_bands' 3 <= 3
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/vivid/vivid-radio-rx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-radio-rx.c b/drivers/media/platform/vivid/vivid-radio-rx.c index c7651a506668..f99092ca8f5c 100644 --- a/drivers/media/platform/vivid/vivid-radio-rx.c +++ b/drivers/media/platform/vivid/vivid-radio-rx.c @@ -195,6 +195,8 @@ int vivid_radio_rx_s_hw_freq_seek(struct file *file, void *fh, const struct v4l2 if (dev->radio_rx_freq >= vivid_radio_bands[band].rangelow && dev->radio_rx_freq <= vivid_radio_bands[band].rangehigh) break; + if (band == TOT_BANDS) + return -EINVAL; low = vivid_radio_bands[band].rangelow; high = vivid_radio_bands[band].rangehigh; } |