module-filter-chain: use pw_split_walk correctly

This commit is contained in:
Wim Taymans 2023-03-16 16:26:52 +01:00
parent cb46c8c5f9
commit 8a9e7dc1c7

View file

@ -214,7 +214,7 @@ struct fc_plugin *load_ladspa_plugin(const struct spa_support *support, uint32_t
struct fc_plugin *pl = NULL;
if (plugin[0] != '/') {
const char *search_dirs, *p;
const char *search_dirs, *p, *state = NULL;
char path[PATH_MAX];
size_t len;
@ -229,7 +229,7 @@ struct fc_plugin *load_ladspa_plugin(const struct spa_support *support, uint32_t
*/
errno = ENAMETOOLONG;
while ((p = pw_split_walk(NULL, ":", &len, &search_dirs))) {
while ((p = pw_split_walk(search_dirs, ":", &len, &state))) {
int pathlen;
if (len >= sizeof(path))