Fixed up INC untaint procedure to skip/ignore CODE, ARRAY, blessed entries.
[p5sagit/local-lib.git] / lib / local / lib.pm
index 1f7a33a..6cd40b2 100644 (file)
@@ -50,7 +50,10 @@ DEATH
       die "unrecognized import argument: $flag";
   }
 
-  m/(.*)/ and $_ = $1 for @INC; # Untaint @INC
+  for (@INC) { # Untaint @INC
+    next if ref; # Skip entry if it is an ARRAY, CODE, blessed, etc.
+    m/(.*)/ and $_ = $1;
+  }
 }
 
 sub pipeline;