Fix UBSan errors
This commit is contained in:
committed by
Gaël Bonithon
parent
7ba61f749b
commit
9bf1713e82
@@ -172,6 +172,9 @@ apps_lookup_pid (GArray *apps, GPid pid)
|
||||
{
|
||||
App tapp;
|
||||
|
||||
if (apps->data == NULL)
|
||||
return (NULL);
|
||||
|
||||
tapp.pid = pid;
|
||||
|
||||
return (bsearch(&tapp, apps->data, apps->len, sizeof(App), app_pid_compare_fn));
|
||||
|
||||
Reference in New Issue
Block a user