From: Gisle Aas Date: Sun, 18 Apr 2010 15:13:46 +0000 (+0200) Subject: Passing regexp vars as argument is unsafe X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6348b76e16558421dd8599cc147a5c7f13fddbb9;p=p5sagit%2Fp5-mst-13.2.git Passing regexp vars as argument is unsafe In this case $_[0] is unexpectedly modified by matching a regular expression inside the function, making it report bad file names. --- diff --git a/Porting/check83.pl b/Porting/check83.pl index 1bd863f..64eac95 100644 --- a/Porting/check83.pl +++ b/Porting/check83.pl @@ -62,7 +62,7 @@ if (open(MANIFEST, "MANIFEST")) { next; } while (m!/|\z!g) { - my ($dir, $edt) = eight_dot_three($`); + my ($dir, $edt) = eight_dot_three("$`"); next unless defined $dir; ($dir, $edt) = map { lc } ($dir, $edt); push @{$dir{$dir}->{$edt}}, $_;