summaryrefslogtreecommitdiff
path: root/src/Region.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-04-13 10:20:59 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-05-03 23:53:29 -0700
commitb031e3b60fa1af9e49449f23d4a84395868be3ab (patch)
tree62d95f77e6d029fa06b9772d2d8d51421b5b5877 /src/Region.c
parentf870dfb47da9d43d1750ea5e5fc9288c4158f7ad (diff)
Use _XEatDataWords to avoid overflow of _XEatData calculations
rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/Region.c')
-rw-r--r--src/Region.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Region.c b/src/Region.c
index 042f966..cb0cf6e 100644
--- a/src/Region.c
+++ b/src/Region.c
@@ -338,7 +338,7 @@ XFixesFetchRegionAndBounds (Display *dpy,
rects = Xmalloc (nrects * sizeof (XRectangle));
if (!rects)
{
- _XEatData (dpy, nbytes);
+ _XEatDataWords(dpy, rep.length);
UnlockDisplay (dpy);
SyncHandle ();
return NULL;