Formula#system: sanitize args before exec
This prevents passing nested arrays to exec; the same thing is done in safe_system. Fixes Homebrew/homebrew#10295. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
c0299ad19b
commit
a9e6f07732
@ -448,6 +448,7 @@ protected
|
|||||||
rd.close
|
rd.close
|
||||||
$stdout.reopen wr
|
$stdout.reopen wr
|
||||||
$stderr.reopen wr
|
$stderr.reopen wr
|
||||||
|
args.collect!{|arg| arg.to_s}
|
||||||
exec(cmd, *args) rescue nil
|
exec(cmd, *args) rescue nil
|
||||||
exit! 1 # never gets here unless exec threw or failed
|
exit! 1 # never gets here unless exec threw or failed
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user