summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_win.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2022-02-03 11:01:33 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-04 11:17:55 +0000
commitff6299e271cb4d06c65d1756de077a1538aaedc5 (patch)
tree2c84d7f4056d374b48499eaebeeb26049644c8cd /src/corelib/kernel/qeventdispatcher_win.cpp
parent089911e47da54619f90b61b57c6820c45d4d377c (diff)
Fix infinite loop in dash stroker
When the positions were large enough, we would get precision errors with the floating point numbers. We calculate the relative position: dpos = pos + dashes[istart] - doffset - estart and then later pos = dpos + estart If estart is a huge number (range of 10^18) and dashes[istart] is a low number (10^1), then estart + dashes[istart] == estart and the loop will never progress, dpos will be 0. Since the loop should never iterate more than dashCount times (since we cut away all full dash sequences before entering it), we add a failsafe that exits the loop if it detects the error. Fixes: QTBUG-99690 Change-Id: Ia6a42f21b6b4c6adf5cdd703b6483750513a88ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 26a0638222933fc549f250333c28d0184205b704) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_win.cpp')
0 files changed, 0 insertions, 0 deletions