diff options
author | marha <marha@users.sourceforge.net> | 2013-07-23 09:20:51 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-23 09:20:51 +0200 |
commit | 5c340ceb9356ea029dea53b73440268d4769d5a5 (patch) | |
tree | ae22100b15246769392280ed7b10eba3dc68b0ea /xorg-server/hw/kdrive/ephyr/XF86dri.c | |
parent | b6aadb8490bdacf33196fa0898fe1247b9a8ee2c (diff) | |
download | vcxsrv-5c340ceb9356ea029dea53b73440268d4769d5a5.tar.gz vcxsrv-5c340ceb9356ea029dea53b73440268d4769d5a5.tar.bz2 vcxsrv-5c340ceb9356ea029dea53b73440268d4769d5a5.zip |
libX11 libXmu mesa xserver git update 23 July 2013
xserver commit d5ebe20f9ba9569351c4a41449866679fd60ba45
libX11 commit feb131b18aee31c2c125dc3275b0260940245882
libXmu commit d5dac08d65c4865f311cb62c161dbb1300eecd11
mesa commit 5a7bdd4b4173958c53109517b7c95f1039623e7e
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr/XF86dri.c')
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/XF86dri.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/XF86dri.c b/xorg-server/hw/kdrive/ephyr/XF86dri.c index 9d742f394..15b62191f 100644 --- a/xorg-server/hw/kdrive/ephyr/XF86dri.c +++ b/xorg-server/hw/kdrive/ephyr/XF86dri.c @@ -64,6 +64,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <GL/glx.h> #include "xf86dri.h" #include <X11/dri/xf86driproto.h> +#include <limits.h> static XExtensionInfo _xf86dri_info_data; static XExtensionInfo *xf86dri_info = &_xf86dri_info_data; @@ -225,8 +226,12 @@ XF86DRIOpenConnection(Display * dpy, int screen, } if (rep.length) { - if (!(*busIdString = (char *) calloc(rep.busIdStringLength + 1, 1))) { - _XEatData(dpy, ((rep.busIdStringLength + 3) & ~3)); + if (rep.busIdStringLength < INT_MAX) + *busIdString = calloc(rep.busIdStringLength + 1, 1); + else + *busIdString = NULL; + if (*busIdString == NULL) { + _XEatDataWords(dpy, rep.length); UnlockDisplay(dpy); SyncHandle(); TRACE("OpenConnection... return False"); @@ -323,10 +328,12 @@ XF86DRIGetClientDriverName(Display * dpy, int screen, *ddxDriverPatchVersion = rep.ddxDriverPatchVersion; if (rep.length) { - if (! - (*clientDriverName = - (char *) calloc(rep.clientDriverNameLength + 1, 1))) { - _XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3)); + if (rep.clientDriverNameLength < INT_MAX) + *clientDriverName = calloc(rep.clientDriverNameLength + 1, 1); + else + *clientDriverName = NULL; + if (*clientDriverName == NULL) { + _XEatDataWords(dpy, rep.length); UnlockDisplay(dpy); SyncHandle(); TRACE("GetClientDriverName... return False"); @@ -532,7 +539,7 @@ XF86DRIGetDrawableInfo(Display * dpy, int screen, Drawable drawable, SIZEOF(xGenericReply) + total_rects * sizeof(drm_clip_rect_t)) + 3) & ~3) >> 2)) { - _XEatData(dpy, rep.length); + _XEatDataWords(dpy, rep.length); UnlockDisplay(dpy); SyncHandle(); TRACE("GetDrawableInfo... return False"); @@ -606,7 +613,7 @@ XF86DRIGetDeviceInfo(Display * dpy, int screen, drm_handle_t * hFrameBuffer, if (rep.length) { if (!(*pDevPrivate = (void *) calloc(rep.devPrivateSize, 1))) { - _XEatData(dpy, ((rep.devPrivateSize + 3) & ~3)); + _XEatDataWords(dpy, rep.length); UnlockDisplay(dpy); SyncHandle(); TRACE("GetDeviceInfo... return False"); |