diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2018-10-06 20:59:25 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2018-10-06 21:17:30 +0200 |
commit | da9d1a5298d34f36accfac0af3640d11e4f70543 (patch) | |
tree | d653868d76c53ae89ff9f33d0c7becc3d5c77e16 /nx-X11 | |
parent | d3bbca712dc7109539f9af985fe2d30a7c9b0419 (diff) | |
download | nx-libs-da9d1a5298d34f36accfac0af3640d11e4f70543.tar.gz nx-libs-da9d1a5298d34f36accfac0af3640d11e4f70543.tar.bz2 nx-libs-da9d1a5298d34f36accfac0af3640d11e4f70543.zip |
nxagent: Fix an excessive request size limitation that broke big-requests.
Fixes ArcticaProject/nx-libs#301, #631
Backport from xorg-xserver:
commit ca82d4bddf235c9b68d51d68636bab40eafb9889
Author: Eric Anholt <eric@anholt.net>
Date: Fri Aug 31 13:00:23 2007 -0700
Bug #7186: Fix an excessive request size limitation that broke big-requests.
MAXBUFSIZE appears to be a leftover of some previous time. Instead, just
use maxBigRequestSize when bigreqs are available (limiting buffers to ~16MB).
When bigreqs are not available, needed won't be larger than the maximum
size of a non-bigreqs request (256kB).
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/os/io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index 6eeee349a..ad1fdcd20 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -301,7 +301,8 @@ ReadRequestFromClient(ClientPtr client) */ oci->lenLastReq = 0; - if (needed > MAXBUFSIZE) +#ifdef BIGREQS + if (needed > maxBigRequestSize << 2) { /* request is too big for us to handle */ /* @@ -312,6 +313,7 @@ ReadRequestFromClient(ClientPtr client) oci->lenLastReq = gotnow; return needed; } +#endif if ((gotnow == 0) || ((oci->bufptr - oci->buffer + needed) > oci->size)) { |