Skip to content

Commit

Permalink
fix #55 : check too big code point value for single byte value in nex…
Browse files Browse the repository at this point in the history
…t_state_val()
  • Loading branch information
K.Kosako committed May 18, 2017
1 parent 83aaca7 commit b4bf968
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/regparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -4044,6 +4044,9 @@ next_state_val(CClassNode* cc, OnigCodePoint *vs, OnigCodePoint v,
switch (*state) {
case CCS_VALUE:
if (*type == CCV_SB) {
if (*vs > 0xff)
return ONIGERR_INVALID_CODE_POINT_VALUE;

BITSET_SET_BIT(cc->bs, (int )(*vs));
}
else if (*type == CCV_CODE_POINT) {
Expand Down

0 comments on commit b4bf968

Please sign in to comment.