Skip to content

libICE: Dereferencing a possible NULL pointer in error.c

Alan Coopersmith requested to merge alanc/libice:issue-5 into master

In function _IceErrorSetupFailed at line no 188, IceAllocScratch is used to allocate memory for variable pStart and pBuf.

IceAllocScratch is using malloc for memory allocation, malloc can return NULL on failure. So before dereferencing pStart and pBuf, NULL check must apply.

Closes: #5 (closed)
Signed-off-by: mahendra mahendra.n@samsung.com
Signed-off-by: Alan Coopersmith alan.coopersmith@oracle.com

Merge request reports

Loading