commit | a83f1cfd7e3513896d95828326d45362f53268d2 | [log] [tgz] |
---|---|---|
author | Nicolas Iooss <nicolas.iooss@m4x.org> | Tue Mar 28 23:41:46 2017 +0200 |
committer | James Carter <jwcart2@tycho.nsa.gov> | Wed Mar 29 10:26:35 2017 -0400 |
tree | bc6933c7917e36e0ba76dd52a2ad8eb282e39da8 | |
parent | 5ed45797df92494a137e16eafb64d54490b1d0d5 [diff] |
libsepol: do not dereference a NULL pointer when stack_init() fails In cond_expr_to_cil() when stack_init(&stack) 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 Iooss <nicolas.iooss@m4x.org>