public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>,
	Manjunath Hadli <manjunath.hadli@ti.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] media: davinci vpbe: array underflow in vpbe_enum_outputs()
Date: Fri, 25 May 2018 13:21:57 +0000	[thread overview]
Message-ID: <20180525132157.rx3fuvzytpsuysft@mwanda> (raw)
In-Reply-To: <a322043a-5b45-b695-4302-173c5111896b@xs4all.nl>

On Fri, May 25, 2018 at 03:16:21PM +0200, Hans Verkuil wrote:
> On 25/05/18 15:12, Dan Carpenter wrote:
> > In vpbe_enum_outputs() we check if (temp_index >= cfg->num_outputs) but
> > the problem is that temp_index can be negative.  I've made
> > cgf->num_outputs unsigned to fix this issue.
> 
> Shouldn't temp_index also be made unsigned? It certainly would make a lot of
> sense to do that.

Yeah, sure.  It doesn't make any difference in terms of runtime but it's
probably cleaner.

regards,
dan carpenter


  reply	other threads:[~2018-05-25 13:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17  9:05 [PATCH] media: v4l2-ioctl: prevent underflow in v4l_enumoutput() Dan Carpenter
2018-05-25  9:06 ` Hans Verkuil
2018-05-25 13:12   ` [PATCH v2] media: davinci vpbe: array underflow in vpbe_enum_outputs() Dan Carpenter
2018-05-25 13:16     ` Hans Verkuil
2018-05-25 13:21       ` Dan Carpenter [this message]
2018-05-29 19:54     ` [PATCH v3] " Lad, Prabhakar
2019-04-24  9:46 ` [PATCH v3 resend] media: davinci/vpbe: " Dan Carpenter

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=20180525132157.rx3fuvzytpsuysft@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=manjunath.hadli@ti.com \
    --cc=mchehab@kernel.org \
    --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