diff options
Diffstat (limited to 'drivers/atm/zatm.c')
-rw-r--r-- | drivers/atm/zatm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 1e41cfbb3708..e89146ddede6 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c @@ -1481,6 +1481,8 @@ static int zatm_ioctl(struct atm_dev *dev,unsigned int cmd,void __user *arg) return -EFAULT; if (pool < 0 || pool > ZATM_LAST_POOL) return -EINVAL; + pool = array_index_nospec(pool, + ZATM_LAST_POOL + 1); if (copy_from_user(&info, &((struct zatm_pool_req __user *) arg)->info, sizeof(info))) return -EFAULT; |