From: Jaroslav Kysela Date: Sun, 1 Dec 2019 13:30:54 +0000 (+0100) Subject: namehint: improve the previous patch (check the returned value) X-Git-Tag: v1.2.2~74 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=6055f8a584296abfc0cec0439ceb708f0eddcc9d;p=alsa-lib.git namehint: improve the previous patch (check the returned value) Signed-off-by: Jaroslav Kysela --- diff --git a/src/control/namehint.c b/src/control/namehint.c index 4927ef97..60c48ae3 100644 --- a/src/control/namehint.c +++ b/src/control/namehint.c @@ -349,7 +349,8 @@ static int try_config(snd_config_t *config, if (snd_config_search(res, "@args", &cfg) >= 0) { snd_config_for_each(i, next, cfg) { /* skip the argument list */ - snd_config_get_id(snd_config_iterator_entry(i), &str); + if (snd_config_get_id(snd_config_iterator_entry(i), &str) < 0) + continue; while (*str && *str >= '0' && *str <= '9') str++; if (*str == '\0') continue;