This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [perl #47195] $1 suddenly tainted after regexp on utf-8 string
authorRick Delaney <rick@consumercontact.com>
Tue, 6 Nov 2007 19:18:45 +0000 (14:18 -0500)
committerNicholas Clark <nick@ccl4.org>
Wed, 7 Nov 2007 19:21:15 +0000 (19:21 +0000)
Message-ID: <20071107001845.GA21000@bort.ca>

[plus remove the TODO from the now passing test]

p4raw-id: //depot/perl@32236

regexec.c
t/op/taint.t

index 3e42f58..1b9fca1 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -5405,8 +5405,8 @@ S_regrepeat(pTHX_ const regexp *prog, const regnode *p, I32 max, int depth)
        } else {
            while (scan < loceol && !isSPACE(*scan))
                scan++;
-           break;
        }
+       break;
     case NSPACEL:
        PL_reg_flags |= RF_tainted;
        if (do_utf8) {
index d33b66c..bb23844 100755 (executable)
@@ -1236,7 +1236,6 @@ foreach my $ord (78, 163, 256) {
     chop $line;
     is($line, 'A1');
     $line =~ /(A\S*)/;
-    local $::TODO = "Bug for UTF-8 not fixed yet" if $ord > 255;
     ok(!tainted($1), "\\S match with chr $ord");
 }