mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
[media] [v3,media] av7110: check for negative array offset
info->num comes from the user. It's type int. If the user passes in a negative value that would cause memory corruption. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
76f1ef427c
commit
cb26a24ee9
1 changed files with 1 additions and 1 deletions
|
@ -277,7 +277,7 @@ static int dvb_ca_ioctl(struct file *file, unsigned int cmd, void *parg)
|
|||
{
|
||||
ca_slot_info_t *info=(ca_slot_info_t *)parg;
|
||||
|
||||
if (info->num > 1)
|
||||
if (info->num < 0 || info->num > 1)
|
||||
return -EINVAL;
|
||||
av7110->ci_slot[info->num].num = info->num;
|
||||
av7110->ci_slot[info->num].type = FW_CI_LL_SUPPORT(av7110->arm_app) ?
|
||||
|
|
Loading…
Reference in a new issue