perl/perl-reg-node-overrun.diff
2024-02-05 14:47:08 +08:00

30 lines
1.4 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- ./regcomp.c.orig 2018-11-21 13:52:45.761266049 +0000
+++ ./regcomp.c 2018-11-21 13:54:46.984977298 +0000
@@ -15103,7 +15103,6 @@ redo_curchar:
if (UCHARAT(RExC_parse) != ')')
vFAIL("Expecting close paren for wrapper for nested extended charclass");
- RExC_parse++;
RExC_flags = save_flags;
goto handle_operand;
}
--- ./t/re/reg_mesg.t.orig 2018-11-21 13:52:45.761266049 +0000
+++ ./t/re/reg_mesg.t 2018-11-21 13:54:46.984977298 +0000
@@ -106,6 +106,8 @@ my $high_mixed_digit = ('A' lt '0') ? '0
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.
##
@@ -292,6 +294,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/",
+
);