Go to file
Simon Hausmann 2a80c04d3b Fix crash when reading window titles with XCB
This is a regression introduced with commit
cb142954c5 that changed the code from
using QString:fromUtf8(name, propertyLength) to QString::fromUtf8(name),
assuming that the property name is a zero-terminated string. That
however is not correct.

ASAN trace:

==4039==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60400001e0b4 at pc 0x7f3383c7d66e bp 0x7ffdc8e3d9b0 sp 0x7ffdc8e3d158
READ of size 5 at 0x60400001e0b4 thread T0
    #0 0x7f3383c7d66d  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x5166d)
    #1 0x7f337602f32a in QString::fromUtf8(char const*, int) ../../../../include/QtCore/../../src/corelib/tools/qstring.h:569
    #2 0x7f337602f32a in QXcbWindow::windowTitle(QXcbConnection const*, unsigned int) /home/simon/dev/qt-5.11/qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp:2861
[...]

0x60400001e0b4 is located 0 bytes to the right of 36-byte region [0x60400001e090,0x60400001e0b4)
allocated by thread T1 (QXcbEventReader) here:
    #0 0x7f3383d0ab50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    #1 0x7f337b397e2b  (/usr/lib/x86_64-linux-gnu/libxcb.so.1+0xde2b)

Change-Id: Ia5024602d3aacb924b5dcd3956672da2a8f10feb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-15 13:34:50 +00:00
bin Fix macOS shadow prefix builds using pre-synced source packages 2017-11-22 07:39:45 +00:00
config.tests Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
dist Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
doc Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
examples Doc: Remove Validators example from highlighted widgets examples 2018-02-15 09:05:29 +00:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qmake Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
src Fix crash when reading window titles with XCB 2018-02-15 13:34:50 +00:00
tests Blacklist tst_QMdiSubWindow::setOpaqueResizeAndMove on macOS 10.12 2018-02-15 13:17:48 +00:00
util QtEdidSupport: Fix private headers 2018-02-02 07:21:49 +00:00
.gitattributes
.gitignore gitignore: don't ignore Info.plist templates for libraries 2017-11-23 07:07:48 +00:00
.qmake.conf Bump version 2018-02-08 17:07:19 +01:00
.tag
config_help.txt Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
configure Remove references to obsolete platforms 2017-11-05 06:33:53 +00:00
configure.bat configure: Prefer cl.exe over clang-cl.exe 2018-01-04 21:22:42 +00:00
configure.json Merge remote-tracking branch 'origin/5.10' into dev 2018-01-02 09:58:44 +01:00
configure.pri Merge remote-tracking branch 'origin/5.10' into dev 2018-01-02 09:58:44 +01:00
header.BSD Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.COMM Add header template for commercial only modules 2015-10-19 10:37:18 +00:00
header.FDL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.GPL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.GPL-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL3
header.LGPL3-COMM
header.LGPL-NOGPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
header.LGPL-ONLY
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LGPL_EXCEPTION.txt
LICENSE.FDL
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.LGPLv21 Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" 2016-06-15 07:02:32 +00:00
LICENSE.PREVIEW.COMMERCIAL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile Add support for Windows UI Automation 2017-11-14 23:31:04 +00:00