diff options
author | Kimmo Ollila <kimmo.ollila@qt.io> | 2017-01-26 12:46:16 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-01-31 13:39:59 +0000 |
commit | a92950743f6589ccdce02ec65c0d6e626ccee211 (patch) | |
tree | 5e43662c3f501cab39fbc5c6bab3d25d5ca04652 /src/qml/qml/qqmlpropertycache.cpp | |
parent | 93c4082f283064dbd8e3028f526a1ca8a102cbf8 (diff) |
Add fixes for INTEGRITY
Full definitions of types are needed in static_casts.
Change-Id: I028ffc40a76cdb16cb297a181b3d9dfe9d09c945
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 562aa1c88a..88ce2fa1b9 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -76,7 +76,8 @@ public: int argumentsValid:1; QList<QByteArray> *names; - int arguments[0]; + + int arguments[1]; }; // Flags that do *NOT* depend on the property's QMetaProperty::userType() and thus are quick @@ -919,7 +920,7 @@ static int EnumType(const QMetaObject *metaobj, const QByteArray &str, int type) QQmlPropertyCacheMethodArguments *QQmlPropertyCache::createArgumentsObject(int argc, const QList<QByteArray> &names) { typedef QQmlPropertyCacheMethodArguments A; - A *args = static_cast<A *>(malloc(sizeof(A) + (argc + 1) * sizeof(int))); + A *args = static_cast<A *>(malloc(sizeof(A) + (argc) * sizeof(int))); args->arguments[0] = argc; args->argumentsValid = false; args->signalParameterStringForJS = 0; |