Re: [PATCH 1/7] libsepol: do not dereference a NULL pointer when stack_init() fails

2017-03-29 Thread James Carter
On 03/28/2017 05:41 PM, Nicolas Iooss wrote: In cond_expr_to_cil() when stack_init() fails, stack is set to NULL and the execution flow jumps to label "exit". This triggers a call to stack_pop(stack) which dereferences a NULL pointer in "if (stack->pos == -1)". This issue has been found using

[PATCH 1/7] libsepol: do not dereference a NULL pointer when stack_init() fails

2017-03-28 Thread Nicolas Iooss
In cond_expr_to_cil() when stack_init() fails, stack is set to NULL and the execution flow jumps to label "exit". This triggers a call to stack_pop(stack) which dereferences a NULL pointer in "if (stack->pos == -1)". This issue has been found using clang's static analyzer. Signed-off-by: Nicolas