Quellcode durchsuchen

apt-get: Create the temporary downloaded changelog inside tmpdir

The code is creating a secure temporary directory, but then creates
the changelog alongside the tmpdir in the same base directory. This
defeats the secure tmpdir creation, making the filename predictable.

Inject a '/' between the tmpdir and the changelog filename.
Guillem Jover vor 11 Jahren
Ursprung
Commit
339bc46487
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      cmdline/apt-get.cc

+ 1 - 1
cmdline/apt-get.cc

@@ -1588,7 +1588,7 @@ static bool DoChangelog(CommandLine &CmdL)
    {
       string changelogfile;
       if (downOnly == false)
-	 changelogfile.append(tmpname).append("changelog");
+	 changelogfile.append(tmpname).append("/changelog");
       else
 	 changelogfile.append(Ver.ParentPkg().Name()).append(".changelog");
       if (DownloadChangelog(Cache, Fetcher, Ver, changelogfile) && downOnly == false)