diff options
author | Martin Jones <martin.jones@nokia.com> | 2012-05-28 15:32:11 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-29 04:37:01 +0200 |
commit | 4285a99b14f05b604c266fdd33cf8edff7ff3ef3 (patch) | |
tree | c506b7dfa018ef51146c7c60defa12264c172c4d /src/qml/qml/qqmlvaluetype_p.h | |
parent | 0e75b2568d706759aa4818d8af9131ed645b65b8 (diff) |
Fix potential buffer overrun.
Found by static analysis. operator[]() accepts index up to
QVariant::UserType-1 but only QVariant::UserType-1 were allocated.
Change-Id: I0691fe268e3ba029441e43bdfcd191400ea21f38
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlvaluetype_p.h')
-rw-r--r-- | src/qml/qml/qqmlvaluetype_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvaluetype_p.h b/src/qml/qml/qqmlvaluetype_p.h index 6641a40328..776847af6f 100644 --- a/src/qml/qml/qqmlvaluetype_p.h +++ b/src/qml/qml/qqmlvaluetype_p.h @@ -164,7 +164,7 @@ public: } private: - mutable QQmlValueType *valueTypes[QVariant::UserType - 1]; + mutable QQmlValueType *valueTypes[QVariant::UserType]; }; class Q_QML_PRIVATE_EXPORT QQmlPointFValueType : public QQmlValueTypeBase<QPointF> |