From: Jaroslav Kysela Date: Tue, 18 Nov 2025 13:00:48 +0000 (+0100) Subject: ucm: be more restrictive for device name with descriptor X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=2da7e29c0cf5ce9a3746b23c5e19fc97c63df20f;p=alsa-lib.git ucm: be more restrictive for device name with descriptor Signed-off-by: Jaroslav Kysela --- diff --git a/src/ucm/parser.c b/src/ucm/parser.c index 2c0d2678..5205dff7 100644 --- a/src/ucm/parser.c +++ b/src/ucm/parser.c @@ -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 {