mirror of
https://github.com/php/php-src.git
synced 2026-03-27 09:42:22 +01:00
Escape value passed to exec()
getmypid() is safe, but no harm being EXTRA safe.
This commit is contained in:
@@ -13,7 +13,7 @@ if ($status !== 0) {
|
||||
--FILE--
|
||||
<?php
|
||||
function countOpenFiles() {
|
||||
exec('lsof -p ' . getmypid() . ' 2> /dev/null', $out);
|
||||
exec('lsof -p ' . escapeshellarg(getmypid()) . ' 2> /dev/null', $out);
|
||||
return count($out);
|
||||
}
|
||||
$filename = __DIR__ . '/bug70417.tar';
|
||||
|
||||
Reference in New Issue
Block a user