summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-12-26 23:39:33 -0200
committerThiago Macieira <thiago.macieira@intel.com>2017-12-27 21:01:00 +0000
commit6f7b64e2a97034f84991e644abd609e73895ffb9 (patch)
tree4c1ad56876c55bd1ca5b939ede169af1387b886d /src/gui/kernel
parente548406d2820b066bdc66c1080976c7710353ae8 (diff)
QMap: fix another UB (invalid cast) relating to QMap's end
Like in commit 75cdf654bcc192ba73a8834e507583a59140e7e4, we use the pointer value of the QMap header (which is of type QMapNodeBase) as a sentinel. It's never dereferenced. In that commit, the issue was calling end() directly; in here, it happens when iterating forward from any element, which means nextNode() can reach back to the header. However, using static_cast is wrong, so we use reinterpret_cast. Change-Id: I39332e0a867442d58082fffd15040317704a87ce Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/kernel')
0 files changed, 0 insertions, 0 deletions