diff options
author | marha <marha@users.sourceforge.net> | 2013-07-23 09:22:39 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-23 09:22:39 +0200 |
commit | a7c19a157eb0ba6a7789fe31f5bf7a2066d7966c (patch) | |
tree | d00e9cb782f34582f722e3da544b9c42b16ac850 /libX11/src/XlibInt.c | |
parent | 81d811ac780a2524fff09a516b6f0212c3f209a2 (diff) | |
parent | 5c340ceb9356ea029dea53b73440268d4769d5a5 (diff) | |
download | vcxsrv-a7c19a157eb0ba6a7789fe31f5bf7a2066d7966c.tar.gz vcxsrv-a7c19a157eb0ba6a7789fe31f5bf7a2066d7966c.tar.bz2 vcxsrv-a7c19a157eb0ba6a7789fe31f5bf7a2066d7966c.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libX11 libXmu mesa xserver git update 23 July 2013
Diffstat (limited to 'libX11/src/XlibInt.c')
-rw-r--r-- | libX11/src/XlibInt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c index 8a51f49c4..5d8b0eb4b 100644 --- a/libX11/src/XlibInt.c +++ b/libX11/src/XlibInt.c @@ -1753,6 +1753,14 @@ void *_XGetRequest(Display *dpy, CARD8 type, size_t len) if (dpy->bufptr + len > dpy->bufmax) _XFlush(dpy); + /* Request still too large, so do not allow it to overflow. */ + if (dpy->bufptr + len > dpy->bufmax) { + fprintf(stderr, + "Xlib: request %d length %zd would exceed buffer size.\n", + type, len); + /* Changes failure condition from overflow to NULL dereference. */ + return NULL; + } if (len % 4) fprintf(stderr, |