aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-01-27 21:01:59 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2017-01-28 11:00:49 +0000
commitc873a176a147cf35c235e395b8797ce42d17188a (patch)
treea29e4f9c28886420a24598c18c5e0925cc6541f8 /src
parentfa4bb3d4e6902babfab0b1a89c9bf76d1c953252 (diff)
QQmlTypeCompiler: Fix read after free in tst_qqmllanguage
invalidAlias.11 revealed a problem with the loop here, in that the vector was modified while it was being iterated. There isn't any need to modify the vector being iterated, as it'll be put into pendingObjects for the next loop. Change-Id: If9b537c4ac00697237d12e4b0be67ef39cc8b3c4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/compiler/qqmltypecompiler.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp
index 393616dfac..b7262e4333 100644
--- a/src/qml/compiler/qqmltypecompiler.cpp
+++ b/src/qml/compiler/qqmltypecompiler.cpp
@@ -1108,10 +1108,9 @@ QQmlComponentAndAliasResolver::AliasResolutionResult QQmlComponentAndAliasResolv
continue;
}
- // Try again later and resolve the target alias first.
- _objectsWithAliases.append(objectIndex);
// restore
alias->idIndex = idIndex;
+ // Try again later and resolve the target alias first.
break;
}
}