linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] video: fbdev: metronomefb: two harmless off by one bugs
Date: Tue, 16 Feb 2016 12:53:30 +0000	[thread overview]
Message-ID: <56C31BCA.2020606@ti.com> (raw)
In-Reply-To: <20160130144432.GF3462@mwanda>

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]



On 30/01/16 16:44, Dan Carpenter wrote:
> par->metromem_cmd->args[] is an array of 31 elements of size u16.  Here
> we have initialized the first "i" elements and want to set the rest to
> zero.
> 
> The issue here is that ARRAY_SIZE(par->metromem_cmd->args) is 31 and not
> 32 as in the original code.  It means that we set ->csum to zero, but
> that is harmless because we immediately set it to the correct value on
> the next line.
> 
> Still, the buffer overflow upsets static checkers so let's correct the
> math.

Thanks, queued for 4.6.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-02-16 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30 14:44 [patch] video: fbdev: metronomefb: two harmless off by one bugs Dan Carpenter
2016-02-16 12:53 ` Tomi Valkeinen [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=56C31BCA.2020606@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=dan.carpenter@oracle.com \
    --cc=jayakumar.lkml@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.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;
as well as URLs for NNTP newsgroup(s).