diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-01-30 15:44:32 +0100 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-02-16 13:52:43 +0100 |
commit | 17f2e8e1dbe2cae66e99fd1a684db10bde792570 (patch) | |
tree | e795ddcfffa1e92fb59b95a5fca8b0665e2a3534 /drivers/video/fbdev/intelfb | |
parent | Linux 4.5-rc4 (diff) | |
download | linux-17f2e8e1dbe2cae66e99fd1a684db10bde792570.tar.xz linux-17f2e8e1dbe2cae66e99fd1a684db10bde792570.zip |
video: fbdev: metronomefb: two harmless off by one bugs
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.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/intelfb')
0 files changed, 0 insertions, 0 deletions