diff options
Diffstat (limited to 'libregexp.c')
-rw-r--r-- | libregexp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libregexp.c b/libregexp.c index 9295fe7..8c47389 100644 --- a/libregexp.c +++ b/libregexp.c @@ -686,6 +686,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': |