mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
module-portal: use spa_atoi32 for safer PID parsing
This commit is contained in:
parent
82e427745d
commit
b6a8f67764
1 changed files with 1 additions and 2 deletions
|
|
@ -114,8 +114,7 @@ context_check_access(void *data, struct pw_impl_client *client)
|
|||
if ((str = pw_properties_get(props, PW_KEY_SEC_PID)) == NULL)
|
||||
return;
|
||||
|
||||
pid = atoi(str);
|
||||
if (pid != impl->portal_pid)
|
||||
if (!spa_atoi32(str, &pid, 10) || pid != impl->portal_pid)
|
||||
return;
|
||||
|
||||
items[0] = SPA_DICT_ITEM_INIT(PW_KEY_ACCESS, "portal");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue