Skip to content
Snippets Groups Projects
Commit a767164a authored by mahendra's avatar mahendra Committed by Alan Coopersmith
Browse files

libICE : Dereferencing a possible NULL pointer in error.c


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.

v2 (by alanc): correct inverted tests for NULL from original patch

Closes: #5
Signed-off-by: default avatarmahendra <mahendra.n@samsung.com>
Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <!22>
parent 3ea01ff3
No related branches found
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment