diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-02-28 17:34:27 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-03-01 09:26:27 +0000 |
commit | 779de6dde45e8173eff748dcb311c60c58e4ae60 (patch) | |
tree | ccbaf5a6c139c2f16e0255c7cfd3cfc62f923098 /src/lib/corelib/tools/installoptions.cpp | |
parent | c1374051a6ec00e0fe725acbab5f02a8f063a682 (diff) |
Prevent files from getting installed outside the install root
That was possible by using ".." in install dir or install prefix.
Task-number: QTCREATORBUG-17790
Change-Id: Ib947b11fe361bc061c40b651a0f4a5a4dd7b3074
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/installoptions.cpp')
-rw-r--r-- | src/lib/corelib/tools/installoptions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/tools/installoptions.cpp b/src/lib/corelib/tools/installoptions.cpp index 1eb9a770d..b1d3bf439 100644 --- a/src/lib/corelib/tools/installoptions.cpp +++ b/src/lib/corelib/tools/installoptions.cpp @@ -128,7 +128,7 @@ QString InstallOptions::installRoot() const */ void InstallOptions::setInstallRoot(const QString &installRoot) { - d->installRoot = installRoot; + d->installRoot = QDir::cleanPath(installRoot); if (!QDir(installRoot).isRoot()) { while (d->installRoot.endsWith(QLatin1Char('/'))) d->installRoot.chop(1); |