Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6706fe55 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

media: dvb_ca_en50221: off by one in dvb_ca_en50221_io_do_ioctl()



The > should be >= so we don't read one element beyond the end of the
ca->slot_info[] array.  The array is allocated in dvb_ca_en50221_init().

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJasmin Jessich <jasmin@anw.at>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 320905ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1391,7 +1391,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct file *file,
		struct dvb_ca_slot *sl;

		slot = info->num;
		if ((slot > ca->slot_count) || (slot < 0)) {
		if ((slot >= ca->slot_count) || (slot < 0)) {
			err = -EINVAL;
			goto out_unlock;
		}