forked from qt-creator/qt-creator
CMake fix deployment data
Fix potential index out of range assertion in QStringList if contents of QtCreatorDeployment.txt would be unexpected(will not contain ':') Change-Id: Ia6ae282ef450e7c56a512b13da801854caec0dfb Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
committed by
Daniel Teske
parent
55b764565a
commit
b204c4dba2
@@ -739,7 +739,10 @@ void CMakeProject::updateApplicationAndDeploymentTargets()
|
||||
absoluteSourcePath.append(QLatin1Char('/'));
|
||||
if (deploymentStream.device()) {
|
||||
while (!deploymentStream.atEnd()) {
|
||||
QStringList file = deploymentStream.readLine().split(QLatin1Char(':'));
|
||||
QString line = deploymentStream.readLine();
|
||||
if (!line.contains(QLatin1Char(':')))
|
||||
continue;
|
||||
QStringList file = line.split(QLatin1Char(':'));
|
||||
deploymentData.addFile(absoluteSourcePath + file.at(0), deploymentPrefix + file.at(1));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user