]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
media: ddbridge: fix buffer overflow in max_set_input_unlocked()
authorDaniel Scheller <d.scheller@gmx.net>
Sun, 9 Jul 2017 19:42:45 +0000 (15:42 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 11:27:35 +0000 (07:27 -0400)
commitb9a92f62c555a37e5676f695e94616a261f9403e
tree3f6132ec8090423dedd7952bfc641692b54329bd
parentbb4cec96e5d7f0ff7f397f4518399be77a2f12db
media: ddbridge: fix buffer overflow in max_set_input_unlocked()

Picked up code parts introduced one smatch error:

  drivers/media/pci/ddbridge/ddbridge-maxs8.c:163 max_set_input_unlocked() error: buffer overflow 'dev->link[port->lnr].lnb.voltage' 4 <= 255

Fix this by clamping the .lnb.voltage array access to 0-3 by "& 3"'ing
dvb->input.

Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ddbridge/ddbridge-maxs8.c