s5h1420: fix a buffer overflow when checking userspace params
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Apr 2015 21:34:40 +0000 (18:34 -0300)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:09:15 +0000 (13:09 +0000)
commit5eed863e8dce5e9b1f0be2a98005076d4d9bd60b
tree23bbf4d037b4acc1d429574c75ac11b9e4ad3983
parent9bc098a042312af22b0ff5ccd78120e4a24b03d9
s5h1420: fix a buffer overflow when checking userspace params

commit 12f4543f5d6811f864e6c4952eb27253c7466c02 upstream.

The maximum size for a DiSEqC command is 6, according to the
userspace API. However, the code allows to write up to 7 values:
drivers/media/dvb-frontends/s5h1420.c:193 s5h1420_send_master_cmd() error: buffer overflow 'cmd->msg' 6 <= 7

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb-frontends/s5h1420.c