ucm: be more restrictive for device name with descriptor

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2025-11-18 14:00:48 +01:00
parent e83fd7806f
commit 2da7e29c0c

View file

@ -1970,6 +1970,11 @@ static int verb_normalize_device_names(snd_use_case_mgr_t *uc_mgr, struct use_ca
colon = strchr(norm_name, ':');
if (colon) {
if (colon[1] == '\0' || strchr(colon + 1, ' ')) {
snd_error(UCM, "device descriptor cannot be empty or contain spaces '%s'", orig_name);
err = -EINVAL;
goto __error;
}
*colon = '\0';
index = 1;
do {