Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335348 > unrolled thread

Re: [patch] video: fbdev: metronomefb: two harmless off by one bugs

Started byTomi Valkeinen <tomi.valkeinen@ti.com>
First post2016-02-16 14:00 +0100
Last post2016-02-16 14:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [patch] video: fbdev: metronomefb: two harmless off by one bugs Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-02-16 14:00 +0100

#1335348 — Re: [patch] video: fbdev: metronomefb: two harmless off by one bugs

FromTomi Valkeinen <tomi.valkeinen@ti.com>
Date2016-02-16 14:00 +0100
SubjectRe: [patch] video: fbdev: metronomefb: two harmless off by one bugs
Message-ID<r2Nou-7Xf-41@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web