From 12358f839a293d7936e12dbabdd1aca953063b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Tue, 19 May 2015 14:35:12 +0200 Subject: [PATCH 1/2] no VBO upload for zero vertex count causes out of bounds segfault BUG: 347900 REVIEW: 123865 FIXED-IN: 5.3.1 --- effects/backgroundcontrast/contrast.cpp | 2 ++ effects/blur/blur.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/effects/backgroundcontrast/contrast.cpp b/effects/backgroundcontrast/contrast.cpp index 059a5d85fb..882055b651 100644 --- a/effects/backgroundcontrast/contrast.cpp +++ b/effects/backgroundcontrast/contrast.cpp @@ -230,6 +230,8 @@ void ContrastEffect::uploadRegion(QVector2D *&map, const QRegion ®ion) void ContrastEffect::uploadGeometry(GLVertexBuffer *vbo, const QRegion ®ion) { const int vertexCount = region.rectCount() * 6; + if (!vertexCount) + return; QVector2D *map = (QVector2D *) vbo->map(vertexCount * sizeof(QVector2D)); uploadRegion(map, region); diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index e238bd2ed8..fe0d467b12 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -236,6 +236,8 @@ void BlurEffect::uploadRegion(QVector2D *&map, const QRegion ®ion) void BlurEffect::uploadGeometry(GLVertexBuffer *vbo, const QRegion &horizontal, const QRegion &vertical) { const int vertexCount = (horizontal.rectCount() + vertical.rectCount()) * 6; + if (!vertexCount) + return; QVector2D *map = (QVector2D *) vbo->map(vertexCount * sizeof(QVector2D)); uploadRegion(map, horizontal); From ae31aaaa13bef41d2f4583e2ed452b2136c8508e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Wed, 20 May 2015 00:24:01 +0200 Subject: [PATCH 2/2] fix presentwindows crash on disabling closebuttons m_closeWindow "dangles" and protects m_closeView access in postPaintScreen REVIEW: 123865 --- effects/presentwindows/presentwindows.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index eacdf24383..be62b619f7 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -135,6 +135,7 @@ void PresentWindowsEffect::reconfigure(ReconfigureFlags) if (m_doNotCloseWindows) { delete m_closeView; m_closeView = nullptr; + m_closeWindow = nullptr; } m_ignoreMinimized = PresentWindowsConfig::ignoreMinimized(); m_accuracy = PresentWindowsConfig::accuracy() * 20;