From: Hans Verkuil <hverkuil@xs4all.nl>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH 13/13] vivid-radio-rx: Don't go past buffer
Date: Thu, 30 Apr 2015 08:21:14 +0200 [thread overview]
Message-ID: <5541C9DA.5070202@xs4all.nl> (raw)
In-Reply-To: <c3004eee94a40cdfaf51b50dad464c25bc974e54.1430262315.git.mchehab@osg.samsung.com>
On 04/29/2015 01:06 AM, Mauro Carvalho Chehab wrote:
> 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>
>
> 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;
> }
>
prev parent reply other threads:[~2015-04-30 6:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7a73d61faf3046af216692dbf1473bafc645ed9f.1430262315.git.mchehab@osg.samsung.com>
2015-04-28 23:06 ` [PATCH 08/13] cx24116: fix a buffer overflow when checking userspace params Mauro Carvalho Chehab
2015-04-28 23:06 ` [PATCH 09/13] af9013: Don't accept invalid bandwidth Mauro Carvalho Chehab
2015-04-28 23:06 ` [PATCH 10/13] cx24117: fix a buffer overflow when checking userspace params Mauro Carvalho Chehab
2015-04-28 23:06 ` [PATCH 11/13] zc3xx: don't go past quality array Mauro Carvalho Chehab
2015-04-28 23:06 ` [PATCH 12/13] zc3xx: remove dead code and uneeded gotos Mauro Carvalho Chehab
2015-04-28 23:06 ` [PATCH 13/13] vivid-radio-rx: Don't go past buffer Mauro Carvalho Chehab
2015-04-30 6:21 ` Hans Verkuil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5541C9DA.5070202@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.