[media] tvp5150: don't go past decoder->input_ent array
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 19 Feb 2016 17:02:30 +0000 (15:02 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 23 Feb 2016 10:15:29 +0000 (07:15 -0300)
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>
drivers/media/i2c/tvp5150.c

index ef393f5daf2ae054a15ec37c3ddb93afe153d78e..ff18444e19e4828418e5ec6cf75747b19dc5c4f5 100644 (file)
@@ -1386,7 +1386,7 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np)
                        goto err_connector;
                }
 
-               if (input_type > TVP5150_INPUT_NUM) {
+               if (input_type >= TVP5150_INPUT_NUM) {
                        ret = -EINVAL;
                        goto err_connector;
                }
This page took 0.027178 seconds and 5 git commands to generate.