Prevent buffer overflow in QXcbWindow.
authorSamuel Rødal <samuel.rodal@nokia.com>
Mon, 17 Sep 2012 15:18:58 +0000 (17:18 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 18 Sep 2012 01:34:08 +0000 (03:34 +0200)
Thanks to Janne Kulmala for noticing this and informing about the fix.

Task-number: QTBUG-27123
Change-Id: Idd3cfd74fb7be277b6d805446aea5784b8fdf2f6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/plugins/platforms/xcb/qxcbwindow.cpp

index e1e8c9e..53bf9f6 100644 (file)
@@ -306,7 +306,7 @@ void QXcbWindow::create()
 
     propagateSizeHints();
 
-    xcb_atom_t properties[4];
+    xcb_atom_t properties[5];
     int propertyCount = 0;
     properties[propertyCount++] = atom(QXcbAtom::WM_DELETE_WINDOW);
     properties[propertyCount++] = atom(QXcbAtom::WM_TAKE_FOCUS);