summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-01 11:11:27 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-04 14:32:13 -0300
commitf1b0c8217fd9507531152c0d6c12253e2e4e22bd (patch)
tree70ce11d01d3ba1938a67aef39c24fc8e27fc4ba5
parent35ccecef6ed48a5602755ddf580c45a026a1dc05 (diff)
downloadop-kernel-dev-f1b0c8217fd9507531152c0d6c12253e2e4e22bd.zip
op-kernel-dev-f1b0c8217fd9507531152c0d6c12253e2e4e22bd.tar.gz
[media] mb86a20s: Fix estimate_rate setting
As reported by Dan Carpenter <dan.carpenter@oracle.com>: Smatch warnings: drivers/media/dvb-frontends/mb86a20s.c:644 mb86a20s_layer_bitrate() error: buffer overflow 'state->estimated_rate' 3 <= 3 What happens there is that estimate_rate index should be the layer number, and not the guard interval. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb-frontends/mb86a20s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c
index f19cd73..4faaf80 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -610,7 +610,7 @@ static void mb86a20s_layer_bitrate(struct dvb_frontend *fe, u32 layer,
__func__, 'A' + layer, segment * isdbt_rate[m][f][i]/1000,
rate, rate);
- state->estimated_rate[i] = rate;
+ state->estimated_rate[layer] = rate;
}
OpenPOWER on IntegriCloud