diff options
author | Oliver Dawes <olliedawes@gmail.com> | 2024-04-03 19:42:42 +0100 |
---|---|---|
committer | Oliver Dawes <olliedawes@gmail.com> | 2024-04-04 14:11:54 +0100 |
commit | d3e36454830012e4fd4c538ddeab7cddbfacdc24 (patch) | |
tree | 4d016d1ad33efa77390f88ae066bff02014e9f3d /src/qml/jsruntime/qv4estable_p.h | |
parent | a8f6a298ae989c2569433d3607f9f696b2dbac93 (diff) |
Fix heap-buffer-overflow in ESTable::remove
Fixes a heap-buffer-overflow issue in ESTable::remove due to an off by
one error in the count provided to memmove calls.
Task-number: QTBUG-123999
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I4ee0fbc16ba8936ea921e5f1d1bb267dae0b1d5f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4estable_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4estable_p.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4estable_p.h b/src/qml/jsruntime/qv4estable_p.h index 25fbf0c372..f0c5c7cb81 100644 --- a/src/qml/jsruntime/qv4estable_p.h +++ b/src/qml/jsruntime/qv4estable_p.h @@ -17,12 +17,13 @@ #include "qv4value_p.h" +class tst_qv4estable; + QT_BEGIN_NAMESPACE -namespace QV4 -{ +namespace QV4 { -class ESTable +class Q_AUTOTEST_EXPORT ESTable { public: ESTable(); @@ -40,13 +41,15 @@ public: void removeUnmarkedKeys(); private: + friend class ::tst_qv4estable; + Value *m_keys = nullptr; Value *m_values = nullptr; uint m_size = 0; uint m_capacity = 0; }; -} +} // namespace QV4 QT_END_NAMESPACE |