From b4c11c7cc56c18ebe14319b3389ff13c625e99d7 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 9 Dec 2015 16:20:27 +0300 Subject: QComposeInputContext: reduce composeBuffer to QT_KEYSEQUENCE_MAX_LEN The extra length has been used for a sentinel null value. By checking the index before indexing into the array, that extra element can be dropped. Change-Id: I0b309420d8d89f75e2381a8065c8e68a1a33427c Reviewed-by: Marc Mutz Reviewed-by: Lars Knoll --- .../platforminputcontexts/compose/qcomposeplatforminputcontext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h') diff --git a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h index bdf5a91335..898eafd786 100644 --- a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h +++ b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.h @@ -68,7 +68,7 @@ protected: private: QObject *m_focusObject; QVector m_composeTable; - uint m_composeBuffer[QT_KEYSEQUENCE_MAX_LEN + 1]; + uint m_composeBuffer[QT_KEYSEQUENCE_MAX_LEN]; TableGenerator::TableState m_tableState; bool m_compositionTableInitialized; }; -- cgit v1.2.3