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.
{
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)