FIRE-34344 - add safeguard for string to longlong conversion against 0 pointer

meow-7.2.2
Zi Ree 2024-08-06 19:38:27 +02:00
parent 526696566d
commit 6d1d0ebb22
1 changed files with 7 additions and 1 deletions

View File

@ -399,7 +399,13 @@ void callback_discovered_sinkinput(pa_context *context, const pa_sink_input_info
if (0 == eol)
{
pa_proplist *proplist = sii->proplist;
pid_t sinkpid = atoll(llpa_proplist_gets(proplist, PA_PROP_APPLICATION_PROCESS_ID));
const char* str = llpa_proplist_gets(proplist, PA_PROP_APPLICATION_PROCESS_ID);
if (!str)
{
return;
}
pid_t sinkpid = atoll(str);
if (isPluginPid( sinkpid )) // does the discovered sinkinput belong to this process?
{