]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] tda10071: fix DiSEqC message len check
authorAntti Palosaari <crope@iki.fi>
Sun, 1 Jul 2012 18:29:15 +0000 (15:29 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 5 Jul 2012 15:59:20 +0000 (12:59 -0300)
Message length check was wrong which could cause garbage sent to LNB,
but only in case garbage got from the userspace application.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/tda10071.c

index c21bc92d2811219d11c468ece8fc9a171498a131..3a1b6c0ac4ae8d2c88cc0afb2343a5e2e2cdfa7f 100644 (file)
@@ -287,7 +287,7 @@ static int tda10071_diseqc_send_master_cmd(struct dvb_frontend *fe,
 
        dbg("%s: msg_len=%d", __func__, diseqc_cmd->msg_len);
 
-       if (diseqc_cmd->msg_len < 3 || diseqc_cmd->msg_len > 16) {
+       if (diseqc_cmd->msg_len < 3 || diseqc_cmd->msg_len > 6) {
                ret = -EINVAL;
                goto error;
        }