File php-composer2-CVE-2024-35241.patch of Package php-composer2.34331

--- a/src/Composer/Downloader/GitDownloader.php
+++ b/src/Composer/Downloader/GitDownloader.php
@@ -290,7 +290,7 @@ if ($branchNotFoundError) {
 $unpushedChanges = null;
 }
 foreach ($remoteBranches as $remoteBranch) {
-$command = sprintf('git diff --name-status %s...%s --', $remoteBranch, $branch);
+$command = sprintf('git diff --name-status %s --', ProcessExecutor::escape($remoteBranch.'...'.$branch));
 if (0 !== $this->process->execute($command, $output, $path)) {
 throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
 }
openSUSE Build Service is sponsored by