summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2017-08-01 09:23:45 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2017-08-02 07:42:05 +0000
commit50a1efcb170f4df0f4602805b7a07b80798d68ab (patch)
treea5b33c112f05fe0112602f627c89a69f60a70dab
parent061e1a8bbe5fb05b8f85811d55e805f54327d1d6 (diff)
downloadqttools-50a1efcb170f4df0f4602805b7a07b80798d68ab.tar.gz
Fix crash regression when using ANDROID_DEPLOYMENT_DEPENDENCIES
Change 919d07e6809a6705941a9819ba145062a947fa39 introduced a splitRef() on a temporary string, which will cause dangling pointers as documented. This caused crashes for everyone using ANDROID_DEPLOYMENT_DEPENDENCIES. [ChangeLog][androiddeployqt] Fixed a crash when using ANDROID_DEPLOYMENT_DEPENDENCIES to specify the files to deploy. Task-number: QTBUG-61636 Change-Id: I16dc84f76667e9b8af5edf79d7c6498657176247 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
-rw-r--r--src/androiddeployqt/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp
index dd5b74bd6..51b514f51 100644
--- a/src/androiddeployqt/main.cpp
+++ b/src/androiddeployqt/main.cpp
@@ -774,7 +774,8 @@ bool readInputFile(Options *options)
{
const QJsonValue deploymentDependencies = jsonObject.value(QStringLiteral("deployment-dependencies"));
if (!deploymentDependencies.isUndefined()) {
- const auto dependencies = deploymentDependencies.toString().splitRef(QLatin1Char(','));
+ QString deploymentDependenciesString = deploymentDependencies.toString();
+ const auto dependencies = deploymentDependenciesString.splitRef(QLatin1Char(','));
for (const QStringRef &dependency : dependencies) {
QString path = options->qtInstallDirectory + QLatin1Char('/') + dependency;
if (QFileInfo(path).isDir()) {