libICE : Dereference pointer before NULL check
Submitted by mah..@..ng.com
Assigned to Xorg Project Team
Description
Created attachment 119394 patch file
File where error is: src/connect.c Function where error is: IceOpenConnection Line of Error: 226
v1.0.9 Code: iceConn->connect_to_you = malloc (sizeof (_IceConnectToYouInfo)); iceConn->connect_to_you->auth_active = 0;
malloc() is used for memory allocation to a pointer iceConn->connect_to_you. Malloc can return NULL so NULL check must apply on iceConn->connect_to_you before dereferencing it.
Please check attached patch to solve the issue.
Attachment 119394, "patch file":
0001-libICE-Dereference-pointer-before-NULL-check.patch