OSDN Git Service

ucm: ctlparse - always terminate cset buffer
authorLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 21 Dec 2010 22:12:00 +0000 (23:12 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 22 Dec 2010 07:06:35 +0000 (08:06 +0100)
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
src/control/ctlparse.c

index c8300f3..a929816 100644 (file)
@@ -208,8 +208,8 @@ int snd_ctl_ascii_elem_id_parse(snd_ctl_elem_id_t *dst, const char *str)
                                        }
                                        str++;
                                }
-                               *ptr = '\0';
                        }
+                       *ptr = '\0';
                        snd_ctl_elem_id_set_name(dst, buf);
                } else if (!strncasecmp(str, "index=", 6)) {
                        str += 6;