|
@@ -1483,6 +1483,8 @@ static int zatm_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg)
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
if (pool < 0 || pool > ZATM_LAST_POOL)
|
|
if (pool < 0 || pool > ZATM_LAST_POOL)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
+ pool = array_index_nospec(pool,
|
|
|
|
+ ZATM_LAST_POOL + 1);
|
|
if (copy_from_user(&info,
|
|
if (copy_from_user(&info,
|
|
&((struct zatm_pool_req __user *) arg)->info,
|
|
&((struct zatm_pool_req __user *) arg)->info,
|
|
sizeof(info))) return -EFAULT;
|
|
sizeof(info))) return -EFAULT;
|