lkml.org 
[lkml]   [2022]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH linux-next] scripts/extract_xc3028: use absolute path for which
Date
From: Xu Panda <xu.panda@zte.com.cn>

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
---
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
\
 
 \ /
  Last update: 2022-09-22 12:27    [W:0.246 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site