1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

Added canary check to mitigate crash on linux

This commit is contained in:
Bryan Roe
2019-05-16 23:38:51 -07:00
parent 8ac2e127ef
commit 26d86ce449

View File

@@ -496,11 +496,17 @@ void ILibProcessPipe_Manager_OnPostSelect(void* object, int slct, fd_set *readse
while(node != NULL && (j = (ILibProcessPipe_PipeObject*)ILibLinkedList_GetDataFromNode(node)) != NULL)
{
nextNode = ILibLinkedList_GetNextNode(node);
if(FD_ISSET(j->mPipe_ReadEnd, readset) != 0)
if (ILibMemory_CanaryOK(j))
{
ILibProcessPipe_Process_ReadHandler(j);
if (FD_ISSET(j->mPipe_ReadEnd, readset) != 0)
{
ILibProcessPipe_Process_ReadHandler(j);
}
}
else
{
ILibLinkedList_Remove(node);
}
node = nextNode;
}
}