[PATCH linux-next] scripts/extract_xc3028: use absolute path for which

From: cgel . zte
Date: Thu Sep 22 2022 - 06:26:59 EST


From: Xu Panda <xu.panda@xxxxxxxxxx>

Not using absolute path when invoking which can lead to serious security
issues.

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Xu Panda <xu.panda@xxxxxxxxxx>
---
scripts/extract_xc3028.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/extract_xc3028.pl b/scripts/extract_xc3028.pl
index e1c9af25a595..c9ddcba07550 100755
--- a/scripts/extract_xc3028.pl
+++ b/scripts/extract_xc3028.pl
@@ -29,7 +29,7 @@ sub verify ($$)
my ($filename, $hash) = @_;
my ($testhash);

- if (system("which md5sum > /dev/null 2>&1")) {
+ if (system("/usr/bin/which md5sum > /dev/null 2>&1")) {
die "This firmware requires the md5sum command - see http://www.gnu.org/software/coreutils/\n";;
}

--
2.15.2