summaryrefslogtreecommitdiff
path: root/sound/core/hwdep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-11-13 15:43:04 +0100
committerTakashi Iwai <tiwai@suse.de>2017-11-13 15:43:13 +0100
commitc429bda21ffafb28f02fb2eb4055b4ab6879ed58 (patch)
tree80715bf534bfa3bcb69ef77cf1dc5f9d98919b44 /sound/core/hwdep.c
parent75ee94b20b46459e3d29f5ac2c3af3cebdeef777 (diff)
parent9718a29d40b7e5ae4692796eb23c54f25559d35e (diff)
Merge branch 'for-next' into for-linus
Pull 4.15 updates to take over the previous urgent fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/hwdep.c')
-rw-r--r--sound/core/hwdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index a73baa1242be..8faae3d1455d 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -228,6 +228,8 @@ static int snd_hwdep_dsp_load(struct snd_hwdep *hw,
memset(&info, 0, sizeof(info));
if (copy_from_user(&info, _info, sizeof(info)))
return -EFAULT;
+ if (info.index >= 32)
+ return -EINVAL;
/* check whether the dsp was already loaded */
if (hw->dsp_loaded & (1 << info.index))
return -EBUSY;