diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-12 07:38:46 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-12 07:38:46 +0100 |
commit | e6826ef14597981f78156a0d5f9553b19f356e3f (patch) | |
tree | 30a19b996778016aefc2d47d5990f0c251d14a02 /sound/core | |
parent | ALSA: seq: Fix init order of snd_seq_device stuff (diff) | |
parent | ALSA: control: Add sanity checks for user ctl id name string (diff) | |
download | linux-e6826ef14597981f78156a0d5f9553b19f356e3f.tar.xz linux-e6826ef14597981f78156a0d5f9553b19f356e3f.zip |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/control.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 833b223a363a..54a412af3224 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -1207,6 +1207,11 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file, struct user_element *ue; int err; + if (!*info->id.name) + return -EINVAL; + if (strnlen(info->id.name, sizeof(info->id.name)) >= sizeof(info->id.name)) + return -EINVAL; + /* Delete a control to replace them if needed. */ if (replace) { info->id.numid = 0; |