spa: audioconvert: Avoid reading past filter-graph param name end

Ensure we have at least a `.` after `audioconvert.filter-graph`, so we
don't try to read past the end if it does not exist.

Cherry-picked from a328e0ae28, dropping
the param doc update as that doesn't exist.
This commit is contained in:
Arun Raghavan 2025-07-09 07:55:09 -04:00
parent af7ce19919
commit 5c9ddfd882

View file

@ -1188,8 +1188,8 @@ static int audioconvert_set_param(struct impl *this, const char *k, const char *
}
else if (spa_streq(k, "channelmix.lock-volumes"))
this->props.lock_volumes = spa_atob(s);
else if (spa_strstartswith(k, "audioconvert.filter-graph")) {
int order = atoi(k+ strlen("audioconvert.filter-graph."));
else if (spa_strstartswith(k, "audioconvert.filter-graph.")) {
int order = atoi(k + strlen("audioconvert.filter-graph."));
if ((res = load_filter_graph(this, s, order)) < 0) {
spa_log_warn(this->log, "Can't load filter-graph %d: %s",
order, spa_strerror(res));