diff options
| author | Morten Sørvig <morten.sorvig@qt.io> | 2022-11-11 12:41:06 +0100 |
|---|---|---|
| committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2022-12-28 18:14:44 +0000 |
| commit | 8a20a278fa5f1e2890f88a69d8b5f96873a67ac9 (patch) | |
| tree | f09ada567397adee57154d982ded6c45118564a1 /src/plugins/sqldrivers/db2/qsql_db2.cpp | |
| parent | ce560d28c8b426d3cb797fa04e9e78d980fc8501 (diff) | |
wasm: avoid LocalStorage past-the-end access on clear()
We were looping over all keys and removing the Qt keys
using an integer index. However, removing one key shifts
all other keys at higher indexes down one step such that
the loop eventually indexes past the end.
Fix this by getting the keys first in a separate step,
and then remove keys without relying on a stable iteration
order (which is also not guaranteed by the standard).
Pick-to: 6.4 6.5
Change-Id: I8bc577d1831d6931ebca2b2e04faf65c9affb429
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/db2/qsql_db2.cpp')
0 files changed, 0 insertions, 0 deletions
