aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_x/xlib/ecore_x_fixes.c
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2013-12-07 18:25:22 +0100
committerSebastian Dransfeld <sd@tango.flipp.net>2013-12-07 21:11:34 +0100
commit8b72bd6e6d4aab3439eb4558c4a5776e17651f94 (patch)
treea8357e09a028e8f3ea98245bb5eaf25736d8ef69 /src/lib/ecore_x/xlib/ecore_x_fixes.c
parentecore_x: Remove NULL check (diff)
downloadefl-8b72bd6e6d4aab3439eb4558c4a5776e17651f94.tar.gz
ecore_x: Fix bug in ecore_x_region_invert
As bounds is a pointer, bounds + num will always be postive, so this is an eternal loop. In addition, XFixesInvertRegion only accepts one region, so num must be 1. Fixes CID 1039469
Diffstat (limited to 'src/lib/ecore_x/xlib/ecore_x_fixes.c')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_fixes.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_fixes.c b/src/lib/ecore_x/xlib/ecore_x_fixes.c
index b647a90e8f..0e7aa1f1a7 100644
--- a/src/lib/ecore_x/xlib/ecore_x_fixes.c
+++ b/src/lib/ecore_x/xlib/ecore_x_fixes.c
@@ -259,11 +259,9 @@ ecore_x_region_invert(Ecore_X_Region dest,
{
#ifdef ECORE_XFIXES
XRectangle *xbound;
- int num = 0;
+ int num = 1;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- while (bounds + num)
- num++;
xbound = _ecore_x_rectangle_ecore_to_x(bounds, num);
XFixesInvertRegion(_ecore_x_disp, dest, xbound, source);