From 4285a99b14f05b604c266fdd33cf8edff7ff3ef3 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 28 May 2012 15:32:11 +1000 Subject: 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 --- src/qml/qml/qqmlvaluetype_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlvaluetype_p.h') 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 -- cgit v1.2.3