use File::Spec::Functions;
BEGIN { require './test.pl'; }
-plan tests => 243;
+plan tests => 245;
$| = 1;
test tainted $x99;
}
+# an mg_get of a tainted value during localization shouldn't taint the
+# statement
+
+{
+ eval { local $0, eval '1' };
+ test $@ eq '';
+}
+
+# [perl #8262] //g loops infinitely on tainted data
+
+{
+ my @a;
+ $a[0] = $^X;
+ my $i = 0;
+ while($a[0]=~ m/(.)/g ) {
+ last if $i++ > 10000;
+ }
+ test $i < 10000, "infinite m//g";
+
+}
+