projects
/
platform
/
upstream
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff52a87
)
Fix crashes when invoking QML JS methods from C++
author
Simon Hausmann
<simon.hausmann@digia.com>
Tue, 21 May 2013 08:27:25 +0000
(10:27 +0200)
committer
Lars Knoll
<lars.knoll@digia.com>
Tue, 21 May 2013 08:34:49 +0000
(10:34 +0200)
Make sure to size the QVarLengthArray properly to avoid out-of-bounds
access.
Change-Id: Id075730ffa2e366a729b401b8563ad7fd59597de
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/qqmlvmemetaobject.cpp
patch
|
blob
|
history
diff --git
a/src/qml/qml/qqmlvmemetaobject.cpp
b/src/qml/qml/qqmlvmemetaobject.cpp
index
838950c
..
d40eeff
100644
(file)
--- a/
src/qml/qml/qqmlvmemetaobject.cpp
+++ b/
src/qml/qml/qqmlvmemetaobject.cpp
@@
-927,7
+927,7
@@
int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
QQmlVMEMetaData::MethodData *data = metaData->methodData() + id;
- QVarLengthArray<QV4::Value, 9> args;
+ QVarLengthArray<QV4::Value, 9> args
(data->parameterCount)
;
for (int ii = 0; ii < data->parameterCount; ++ii)
args[ii] = ep->v8engine()->fromVariant(*(QVariant *)a[ii + 1]);