Commit f1b0c821 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] mb86a20s: Fix estimate_rate setting

As reported by Dan Carpenter <>:

	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: default avatarDan Carpenter <>
Signed-off-by: default avatarMauro Carvalho Chehab <>
parent 35ccecef
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment