From 1802a825139b2bcefec4329ead56a18060510d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 29 Jul 2008 13:36:55 +0000 Subject: [PATCH] Fix out-of-bounds array access when increasing screen count with randr1.2. BUG: 163045 svn path=/trunk/KDE/kdebase/workspace/; revision=839192 --- geometry.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geometry.cpp b/geometry.cpp index a71fedc779..3a85893dfb 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -175,8 +175,10 @@ void Workspace::updateClientArea( bool force ) { if( workarea[ i ] != new_wareas[ i ] ) changed = true; + if( screenarea[ i ].size() != new_sareas[ i ].size()) + changed = true; for( int iS = 0; - iS < nscreens; + !changed && iS < nscreens; iS ++ ) if (new_sareas[ i ][ iS ] != screenarea [ i ][ iS ]) changed = true;