mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 10:14:23 +08:00
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: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jasmin Jessich <jasmin@anw.at> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
320905baa1
commit
6706fe55af
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user