cx24116: fix a buffer overflow when checking userspace params
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Apr 2015 21:51:17 +0000 (18:51 -0300)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:09:15 +0000 (13:09 +0000)
commit4690eecbbdde2a4a61ea7025c4caf30412d714c8
treed417dda4d581fdf39b5906f7f486a42bb5026263
parent5eed863e8dce5e9b1f0be2a98005076d4d9bd60b
cx24116: fix a buffer overflow when checking userspace params

commit 1fa2337a315a2448c5434f41e00d56b01a22283c upstream.

The maximum size for a DiSEqC command is 6, according to the
userspace API. However, the code allows to write up much more values:
drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23

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