← Commit list

b11f43a4db

Daniel Stenberg
Daniel Stenberg
2026-03-18
SUCCESS Duration: 259s

Subject

top-complexity: prevent filename-based shell injection risk

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

scripts/top-complexity+6 -4
@@ -60,8 +60,8 @@ if(! -r "lib/url.c" || ! -r "lib/urldata.h") {
}
my @files;
-open(F, "git ls-files '*.c'|");
-while(<F>) {
+open(my $git, "-|", "git", "ls-files", "*.c") or die "git ls-files failed: $!";
+while(<$git>) {
chomp $_;
my $file = $_;
# we cannot filter these with git so do it here
@@ -69,9 +69,11 @@ while(<F>) {
push @files, $file;
}
}
+close($git);
-my $cmd = "$pmccabe ".join(" ", @files);
-my @output=`$cmd`;
+open(my $pmc, "-|", $pmccabe, @files) or die "pmccabe failed: $!";
+my @output = <$pmc>;
+close($pmc);
# these functions can have these scores, but not higher
my %whitelist = (