[ruby/yarp] Don't read past the end of input parsing regex group
https://github.com/ruby/yarp/commit/03f5a330a9
This commit is contained in:
parent
7ce6bcaf8b
commit
6dc2314965
@ -380,7 +380,7 @@ yp_regexp_parse_group(yp_regexp_parser_t *parser) {
|
|||||||
break;
|
break;
|
||||||
case '\'': { // named capture group
|
case '\'': { // named capture group
|
||||||
const char *start = ++parser->cursor;
|
const char *start = ++parser->cursor;
|
||||||
if (!yp_regexp_char_find(parser, '\'')) {
|
if (yp_regexp_char_is_eof(parser) || !yp_regexp_char_find(parser, '\'')) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user