diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-12 09:38:46 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-12 09:38:46 +0300 |
commit | e6826ef14597981f78156a0d5f9553b19f356e3f (patch) | |
tree | 30a19b996778016aefc2d47d5990f0c251d14a02 /sound/core/control.c | |
parent | 4945f1fdc14ef090abe50d1b5682bfc1e4763c06 (diff) | |
parent | be3bb8236db2d0fcd705062ae2e2a9d75131222f (diff) | |
download | linux-e6826ef14597981f78156a0d5f9553b19f356e3f.tar.xz |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'sound/core/control.c')
-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; |