Skip to content

Commit

Permalink
[ruby/yarp] If ? is last char of regexp buffer, don't read beyond it.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjohnstone authored and matzbot committed Jun 23, 2023
1 parent 6dc2314 commit 6ee106f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yarp/regexp.c
Expand Up @@ -338,6 +338,9 @@ static bool
yp_regexp_parse_group(yp_regexp_parser_t *parser) {
// First, parse any options for the group.
if (yp_regexp_char_accept(parser, '?')) {
if (yp_regexp_char_is_eof(parser)) {
return false;
}
yp_regexp_options_t options;
yp_regexp_options_init(&options);

Expand Down

0 comments on commit 6ee106f

Please sign in to comment.