Skip to content

Commit

Permalink
[ruby/yarp] Don't read past the end of input parsing regex group
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjohnstone authored and matzbot committed Jun 23, 2023
1 parent 7ce6bca commit 6dc2314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yarp/regexp.c
Expand Up @@ -380,7 +380,7 @@ yp_regexp_parse_group(yp_regexp_parser_t *parser) {
break;
case '\'': { // named capture group
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;
}

Expand Down

0 comments on commit 6dc2314

Please sign in to comment.