Escape shell args

This commit is contained in:
Romain Neutron 2012-06-14 17:05:03 +02:00
commit 644ad9de63

View file

@ -38,7 +38,7 @@ class FFProbe extends Binary
throw new InvalidArgumentException($pathfile);
}
$cmd = $this->binary . ' ' . $pathfile . ' -show_format';
$cmd = $this->binary . ' ' . escapeshellarg($pathfile) . ' -show_format';
$output = $this->executeProbe($cmd);
@ -84,7 +84,7 @@ class FFProbe extends Binary
throw new InvalidArgumentException($pathfile);
}
$cmd = $this->binary . ' ' . $pathfile . ' -show_streams';
$cmd = $this->binary . ' ' . escapeshellarg($pathfile) . ' -show_streams';
$output = explode("\n", $this->executeProbe($cmd));