Skip to content
Permalink
Browse files

Make sure that loop depth is greater than 0 before decrementing it.

  • Loading branch information...
plusvic committed Jan 9, 2017
1 parent d16868f commit 7f02eca670f29c00a1d2c305e96febae6ce5d37b
Showing with 5 additions and 2 deletions.
  1. +5 −2 libyara/grammar.y
@@ -1017,8 +1017,11 @@ expression
}
| _FOR_ for_expression error
{
compiler->loop_depth--;
compiler->loop_identifier[compiler->loop_depth] = NULL;
if (compiler->loop_depth > 0)
{
compiler->loop_depth--;
compiler->loop_identifier[compiler->loop_depth] = NULL;
}
}
| _FOR_ for_expression _IDENTIFIER_ _IN_
{

0 comments on commit 7f02eca

Please sign in to comment.
You can’t perform that action at this time.