diff --git a/vendor/quickjs/libregexp.c b/vendor/quickjs/libregexp.c index a2d56a7d..2b2422ce 100644 --- a/vendor/quickjs/libregexp.c +++ b/vendor/quickjs/libregexp.c @@ -683,6 +683,10 @@ static int get_class_atom(REParseState *s, CharRange *cr, c = '\\'; } break; + case '-': + if (!inclass && s->is_unicode) + goto invalid_escape; + break; #ifdef CONFIG_ALL_UNICODE case 'p': case 'P':