develooper Front page | perl.perl5.changes | Postings from February 2018

[perl.git] branch blead updated. v5.27.8-166-g12453e29a2

From:
Yves Orton
Date:
February 7, 2018 22:07
Subject:
[perl.git] branch blead updated. v5.27.8-166-g12453e29a2
Message ID:
E1ejXrx-0002ZO-QF@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/12453e29a22d63862ba5924c61c08baabd9c6782?hp=7c4a22ed65ae021292a3c6b7a2736204e26c55cf>

- Log -----------------------------------------------------------------
commit 12453e29a22d63862ba5924c61c08baabd9c6782
Author: Yves Orton <demerphq@gmail.com>
Date:   Wed Feb 7 23:00:18 2018 +0100

    fix perl #132630, dont try to fbm match past end of string

-----------------------------------------------------------------------

Summary of changes:
 regexec.c  | 4 +++-
 t/re/pat.t | 5 ++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/regexec.c b/regexec.c
index 08bf7134cc..cd83715e8d 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1238,7 +1238,7 @@ Perl_re_intuit_start(pTHX_
 
             if (check_len > targ_len) {
                 DEBUG_EXECUTE_r(Perl_re_printf( aTHX_
-			      "Anchored string too short...\n"));
+			      "Target string too short to match required substring...\n"));
                 goto fail_finish;
             }
 
@@ -1253,6 +1253,8 @@ Perl_re_intuit_start(pTHX_
                                 end_point - check_len
                             )
                             + check_len;
+                if (end_point < start_point)
+                    goto fail_finish;
             }
         }
 
diff --git a/t/re/pat.t b/t/re/pat.t
index 27d9833714..d327a36475 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -23,7 +23,7 @@ BEGIN {
     skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
     skip_all_without_unicode_tables();
 
-plan tests => 845;  # Update this when adding/deleting tests.
+plan tests => 846;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1938,6 +1938,9 @@ EOP
     {
         fresh_perl_is('"AA" =~ m/AA{1,0}/','',{},"handle OPFAIL insert properly");
     }
+    {
+        fresh_perl_is('$_="0\x{1000000}";/^000?\0000/','',{},"dont throw assert errors trying to fbm past end of string");
+    }
 
 } # End of sub run_tests
 

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About