From 644ad9de63be4c5c4a0ca3ea25828f347e11a08d Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 14 Jun 2012 17:05:03 +0200 Subject: [PATCH] Escape shell args --- src/FFMpeg/FFProbe.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FFMpeg/FFProbe.php b/src/FFMpeg/FFProbe.php index 6e51b79..1fc0aca 100644 --- a/src/FFMpeg/FFProbe.php +++ b/src/FFMpeg/FFProbe.php @@ -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));