diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-11 02:54:39 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-11 02:54:39 +0000 |
commit | b8ef571c47de93e867861f93a04f9c8d328bd473 (patch) | |
tree | ecfc35105466ab7cddf08e107542a6db19f06fc9 /t/op/pat.t | |
parent | b4324e9b79052046920e4a664bf29fd2d95cc19e (diff) | |
download | perl-b8ef571c47de93e867861f93a04f9c8d328bd473.tar.gz |
Integrate changes #9675,9676 from maintperl into mainline.
fix for bug 20010410.006, undo change#7115
port the OpenBSD glob() security patch
p4raw-link: @9676 on //depot/maint-5.6/perl: 3f3c3e312f619efa81ad88565a24e92f15dff662
p4raw-link: @9675 on //depot/maint-5.6/perl: c84593816ace2807d5ff27bb0745a28ec29187b1
p4raw-link: @7115 on //depot/perl: 5675c1a6395a0842c857fc8de159747577df6c4b
p4raw-id: //depot/perl@9677
p4raw-integrated: from //depot/maint-5.6/perl@9672 'copy in'
ext/File/Glob/bsd_glob.h (@9264..) ext/File/Glob/bsd_glob.c
(@9512..) ext/File/Glob/Glob.xs (@9545..) 'merge in' t/op/pat.t
(@9138..) regexec.c (@9288..) ext/File/Glob/Glob.pm (@9512..)
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-x | t/op/pat.t | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index c3024a2f2d..9cd6e9db87 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -5,7 +5,7 @@ # that does fit that format, add it to op/re_tests, not here. $| = 1; -print "1..581\n"; +print "1..586\n"; BEGIN { chdir 't' if -d 't'; @@ -1547,3 +1547,28 @@ print "ok 247\n"; print "ok 581\n"; } + +{ + # bugid 20010410.006 + for my $rx ( + '/(.*?)\{(.*?)\}/csg', + '/(.*?)\{(.*?)\}/cg', + '/(.*?)\{(.*?)\}/sg', + '/(.*?)\{(.*?)\}/g', + '/(.+?)\{(.+?)\}/csg', + ) + { + my($input, $i); + + $i = 0; + $input = "a{b}c{d}"; + eval <<EOT; + while (eval \$input =~ $rx) { + print "# \\\$1 = '\$1' \\\$2 = '\$2'\n"; + ++\$i; + } +EOT + print "not " unless $i == 2; + print "ok " . $test++ . "\n"; + } +} |