diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-05-01 23:58:39 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-05-23 08:13:25 -0700 |
commit | 59b8e1388a687f871831ac5a9e0ac11de75e2516 (patch) | |
tree | d2da4d43b4914089efdde02ace9613b41a937427 /src/XListDev.c | |
parent | 5d43d4914dcabb6de69859567061e99300e56ef4 (diff) | |
download | xorg-lib-libXi-59b8e1388a687f871831ac5a9e0ac11de75e2516.tar.gz |
Use _XEatDataWords to avoid overflow of rep.length bit shifting
rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/XListDev.c')
-rw-r--r-- | src/XListDev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XListDev.c b/src/XListDev.c index bd6e70a..1fa4747 100644 --- a/src/XListDev.c +++ b/src/XListDev.c @@ -202,7 +202,7 @@ XListInputDevices( list = (xDeviceInfo *) Xmalloc(rlen); slist = list; if (!slist) { - _XEatData(dpy, (unsigned long)rlen); + _XEatDataWords(dpy, rep.length); UnlockDisplay(dpy); SyncHandle(); return (XDeviceInfo *) NULL; |