diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-07 20:06:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-08 06:11:06 -0400 |
commit | b1f89331190820c42397156063fe5e39bc514e3b (patch) | |
tree | f56386e354aa7c2f4a563bfad8fc6f4b0e99a770 /drivers/media/dvb-frontends | |
parent | 5cb88ca84aa8dc4efcabd8482fff6002774c7f03 (diff) |
[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>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r-- | drivers/media/dvb-frontends/mb86a20s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c index f2565896ce42..d25df75ed404 100644 --- a/drivers/media/dvb-frontends/mb86a20s.c +++ b/drivers/media/dvb-frontends/mb86a20s.c | |||
@@ -642,7 +642,7 @@ static void mb86a20s_layer_bitrate(struct dvb_frontend *fe, u32 layer, | |||
642 | __func__, 'A' + layer, segment * isdbt_rate[m][f][i]/1000, | 642 | __func__, 'A' + layer, segment * isdbt_rate[m][f][i]/1000, |
643 | rate, rate); | 643 | rate, rate); |
644 | 644 | ||
645 | state->estimated_rate[i] = rate; | 645 | state->estimated_rate[layer] = rate; |
646 | } | 646 | } |
647 | 647 | ||
648 | 648 | ||