diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-04-13 10:20:59 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-05-03 23:53:29 -0700 |
commit | b031e3b60fa1af9e49449f23d4a84395868be3ab (patch) | |
tree | 62d95f77e6d029fa06b9772d2d8d51421b5b5877 /src/Region.c | |
parent | f870dfb47da9d43d1750ea5e5fc9288c4158f7ad (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.c | 2 |
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; |