public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Prabhakar Lad <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH 3/5] [media] tvp5150: don't go past decoder->input_ent array
Date: Mon, 22 Feb 2016 11:21:49 -0300	[thread overview]
Message-ID: <56CB197D.5040904@osg.samsung.com> (raw)
In-Reply-To: <9d4dc6dc7e74437be0ad48495879bf0da458f713.1456150537.git.mchehab@osg.samsung.com>

Hello Mauro,

On 02/22/2016 11:16 AM, Mauro Carvalho Chehab wrote:
> drivers/media/i2c/tvp5150.c:1394 tvp5150_parse_dt() warn: buffer overflow 'decoder->input_ent' 3 <= 3
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> ---
>   drivers/media/i2c/tvp5150.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
> index ef393f5daf2a..ff18444e19e4 100644
> --- a/drivers/media/i2c/tvp5150.c
> +++ b/drivers/media/i2c/tvp5150.c
> @@ -1386,7 +1386,7 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np)
>   			goto err_connector;
>   		}
>
> -		if (input_type > TVP5150_INPUT_NUM) {
> +		if (input_type >= TVP5150_INPUT_NUM) {
>   			ret = -EINVAL;
>   			goto err_connector;
>   		}
>

Thanks for the fix.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

  reply	other threads:[~2016-02-22 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 14:16 [PATCH 1/5] [media] xc4000: shut up a bogus smatch message Mauro Carvalho Chehab
2016-02-22 14:16 ` [PATCH 2/5] [media] v4l2-mc: fix hardware version for PCI devices Mauro Carvalho Chehab
2016-02-22 14:16 ` [PATCH 3/5] [media] tvp5150: don't go past decoder->input_ent array Mauro Carvalho Chehab
2016-02-22 14:21   ` Javier Martinez Canillas [this message]
2016-02-22 14:16 ` [PATCH 4/5] [media] saa7134: fix detection of external decoders Mauro Carvalho Chehab
2016-02-22 14:16 ` [PATCH 5/5] [media] dib0090: do the right thing if rf_ramp is NULL Mauro Carvalho Chehab

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=56CB197D.5040904@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.com \
    --cc=prabhakar.csengg@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox