protocol-native: check for NULL strings

SPA_POD_String allows NULL strings, so check for them.
This commit is contained in:
Demi Marie Obenour 2025-07-04 13:53:23 -04:00 committed by Wim Taymans
parent adb3a55703
commit c54fdb76f8

View file

@ -33,6 +33,8 @@ static inline int parse_item(struct spa_pod_parser *prs, struct spa_dict_item *i
SPA_POD_String(&item->value),
NULL)) < 0)
return res;
if (item->key == NULL || item->value == NULL)
return -EINVAL;
if (spa_strstartswith(item->value, "pointer:"))
item->value = "";
return 0;