From 5dfd9842f2802803604cf517016d4d0518226006 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 24 Sep 2018 11:54:41 -0600 Subject: PATCH: [perl #133423] for 5.26 maint --- regcomp.c | 1 - t/re/reg_mesg.t | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/regcomp.c b/regcomp.c index ca47db7573..431006e855 100644 --- a/regcomp.c +++ b/regcomp.c @@ -15109,7 +15109,6 @@ redo_curchar: RExC_parse++; assert(UCHARAT(RExC_parse) == ')'); - RExC_parse++; RExC_flags = save_flags; goto handle_operand; } diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t index 39cfcf7df1..d26a7caf37 100644 --- a/t/re/reg_mesg.t +++ b/t/re/reg_mesg.t @@ -106,6 +106,8 @@ my $high_mixed_digit = ('A' lt '0') ? '0' : 'A'; my $colon_hex = sprintf "%02X", ord(":"); my $tab_hex = sprintf "%02X", ord("\t"); +my $bug133423 = "(?[(?^:(?[\\\x00]))\\]\x00|2[^^]\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80])R.\\670"; + ## ## Key-value pairs of code/error of code that should have fatal errors. ## @@ -290,6 +292,8 @@ my @death = '/(?xmsixp)abc/' => "", '/(?xxxx:abc)/' => "", '/(?<=/' => 'Sequence (?... not terminated {#} m/(?<={#}/', # [perl #128170] + "/$bug133423/" => "Operand with no preceding operator {#} m/(?[(?^:(?[\\]))\\{#}]|2[^^]\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80])R.\\670/", + ); -- cgit v1.2.1