diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-28 23:34:40 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-30 18:59:54 +0200 |
commit | 12f4543f5d6811f864e6c4952eb27253c7466c02 (patch) | |
tree | 67c7536835efd2fc1d781921c15a2945956a04bb /drivers/media/dvb-frontends/s5h1420.c | |
parent | [media] stv0288: fix indentation (diff) | |
download | linux-12f4543f5d6811f864e6c4952eb27253c7466c02.tar.xz linux-12f4543f5d6811f864e6c4952eb27253c7466c02.zip |
[media] s5h1420: fix a buffer overflow when checking userspace params
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
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/s5h1420.c')
-rw-r--r-- | drivers/media/dvb-frontends/s5h1420.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/s5h1420.c b/drivers/media/dvb-frontends/s5h1420.c index 93eeaf7118fd..0b4f8fe6bf99 100644 --- a/drivers/media/dvb-frontends/s5h1420.c +++ b/drivers/media/dvb-frontends/s5h1420.c @@ -180,7 +180,7 @@ static int s5h1420_send_master_cmd (struct dvb_frontend* fe, int result = 0; dprintk("enter %s\n", __func__); - if (cmd->msg_len > 8) + if (cmd->msg_len > sizeof(cmd->msg)) return -EINVAL; /* setup for DISEQC */ |