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
|
||||
$stdout.reopen wr
|
||||
$stderr.reopen wr
|
||||
args.collect!{|arg| arg.to_s}
|
||||
exec(cmd, *args) rescue nil
|
||||
exit! 1 # never gets here unless exec threw or failed
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user