Skip to content

Commit

Permalink
fix out of bounds read -\xc1\xfb{22}
Browse files Browse the repository at this point in the history
  • Loading branch information
kkos committed Aug 27, 2016
1 parent 162cf91 commit 8293fd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/regparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,8 +2301,10 @@ fetch_range_quantifier(UChar** src, UChar* end, OnigToken* tok, ScanEnv* env)
return r; /* 0: normal {n,m}, 2: fixed {n} */

invalid:
if (syn_allow)
if (syn_allow) {
*src = p;
return 1; /* OK */
}
else
return ONIGERR_INVALID_REPEAT_RANGE_PATTERN;
}
Expand Down

0 comments on commit 8293fd4

Please sign in to comment.