Skip to content

Commit

Permalink
Fix invalid state(CCS_VALUE) in parse_char_class()
Browse files Browse the repository at this point in the history
  • Loading branch information
k-takata committed Jul 12, 2017
1 parent ee5f2e2 commit 783b7ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions regparse.c
Expand Up @@ -4767,6 +4767,12 @@ parse_char_class(Node** np, Node** asc_np, OnigToken* tok, UChar** src, UChar* e
CC_ESC_WARN(env, (UChar* )"-");
goto range_end_val;
}

if (val_type == CCV_CLASS) {
r = ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS;
goto err;
}

state = CCS_RANGE;
}
else if (state == CCS_START) {
Expand Down

0 comments on commit 783b7ef

Please sign in to comment.