D28889: Avoid crash in KWin::DrmOutput::updateCursor
Fabian Vogt
noreply at phabricator.kde.org
Fri Apr 17 09:26:04 BST 2020
fvogt requested changes to this revision.
fvogt added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> meven wrote in drm_output.cpp:90
> I replace those deletes, as they did not delete the m_cursor array and allowed m_cursor[i] to keep dangling pointers causing down the line crash in QImage rather than a proper segfault where m_cursor[i] was used.
To avoid dangling pointers it would have to use
delete m_cursor[0];
m_cursor[0] = nullptr;
`delete[] m_cursor` is like `free(m_cursor)`. It'll most likely crash.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D28889
To: meven, #kwin, zzag, davidedmundson, fvogt
Cc: fvogt, ngraham, apol, kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200417/7be0e98a/attachment.html>
More information about the kwin
mailing list