]> source.dussan.org Git - nextcloud-server.git/commitdiff
escape $second + update PHPDoc
authorThomas Müller <thomas.mueller@tmit.eu>
Wed, 16 Apr 2014 17:45:55 +0000 (19:45 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Wed, 16 Apr 2014 17:45:55 +0000 (19:45 +0200)
lib/private/preview/movies.php

index ed28a03afab583c9937602424e62089ffc8be6a8..72ccfadc6e993de90820a4bfe53439855a03d190 100644 (file)
@@ -65,11 +65,11 @@ if (!\OC_Util::runningOnWindows()) {
                        }
 
                        /**
-                        * @param $maxX
-                        * @param $maxY
-                        * @param $absPath
-                        * @param $tmpPath
-                        * @param $second
+                        * @param int $maxX
+                        * @param int $maxY
+                        * @param string $absPath
+                        * @param string $tmpPath
+                        * @param int $second
                         * @return bool|\OC_Image
                         */
                        private function generateThumbNail($maxX, $maxY, $absPath, $second)
@@ -77,12 +77,12 @@ if (!\OC_Util::runningOnWindows()) {
                                $tmpPath = \OC_Helper::tmpFile();
 
                                if (self::$avconvBinary) {
-                                       $cmd = self::$avconvBinary . ' -an -y -ss ' . $second .
+                                       $cmd = self::$avconvBinary . ' -an -y -ss ' . escapeshellarg($second) .
                                                ' -i ' . escapeshellarg($absPath) .
                                                ' -f mjpeg -vframes 1 -vsync 1 ' . escapeshellarg($tmpPath) .
                                                ' > /dev/null 2>&1';
                                } else {
-                                       $cmd = self::$ffmpegBinary . ' -y -ss ' .$second .
+                                       $cmd = self::$ffmpegBinary . ' -y -ss ' . escapeshellarg($second) .
                                                ' -i ' . escapeshellarg($absPath) .
                                                ' -f mjpeg -vframes 1' .
                                                ' -s ' . escapeshellarg($maxX) . 'x' . escapeshellarg($maxY) .