https://bugs.kde.org/show_bug.cgi?id=434557
Bug ID: 434557 Summary: KXMessages::broadcastMessageX triggers deprecated QByteArray behavior Product: frameworks-kwindowsystem Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: kwin-bugs-n...@kde.org Reporter: nicolas.fe...@gmx.de Target Milestone: --- SUMMARY In https://invent.kde.org/frameworks/kwindowsystem/-/blob/master/src/platforms/xcb/kxmessages.cpp#L331 msg can be accesses out of bounds (due to the pos <= len above). In Qt5 this causes a nullbyte to be read, but that behavior is deprecated (https://doc.qt.io/qt-5/qbytearray.html#operator-5b-5d), causing a runtime warning: Using QByteRef with an index pointing outside the valid range of a QByteArray. The corresponding behavior is deprecated, and will be changed in a future version of Qt In Qt6 this results in an assert STEPS TO REPRODUCE 1. Run kxmessages_unittest against Qt6 or put Q_ASSERT(i+pos < msg.length()) in the code OBSERVED RESULT An assert triggers EXPECTED RESULT No assert SOFTWARE/OS VERSIONS KDE Frameworks Version: master Qt Version: Current dev or 5.15 + manual assert -- You are receiving this mail because: You are watching all bug changes.