diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-19 12:02:30 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-23 05:15:29 -0500 |
commit | 60ad768933ec16e784087f6d07aeeb0e91149221 (patch) | |
tree | 483445e71574eceada18c2fcb19cd9921d3f3705 | |
parent | 8e9a8b1212da7a68eb57beec6e16f80ff4f27e6f (diff) |
[media] tvp5150: don't go past decoder->input_ent array
drivers/media/i2c/tvp5150.c:1394 tvp5150_parse_dt() warn: buffer overflow 'decoder->input_ent' 3 <= 3
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index ef393f5daf2a..ff18444e19e4 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c | |||
@@ -1386,7 +1386,7 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) | |||
1386 | goto err_connector; | 1386 | goto err_connector; |
1387 | } | 1387 | } |
1388 | 1388 | ||
1389 | if (input_type > TVP5150_INPUT_NUM) { | 1389 | if (input_type >= TVP5150_INPUT_NUM) { |
1390 | ret = -EINVAL; | 1390 | ret = -EINVAL; |
1391 | goto err_connector; | 1391 | goto err_connector; |
1392 | } | 1392 | } |