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).
This commit is contained in:
parent
a02db0d500
commit
ca82d4bddf
4
os/io.c
4
os/io.c
|
@ -304,12 +304,14 @@ ReadRequestFromClient(ClientPtr client)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
oci->lenLastReq = 0;
|
oci->lenLastReq = 0;
|
||||||
if (needed > MAXBUFSIZE)
|
#ifdef BIGREQS
|
||||||
|
if (needed > maxBigRequestSize << 2)
|
||||||
{
|
{
|
||||||
/* request is too big for us to handle */
|
/* request is too big for us to handle */
|
||||||
YieldControlDeath();
|
YieldControlDeath();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if ((gotnow == 0) ||
|
if ((gotnow == 0) ||
|
||||||
((oci->bufptr - oci->buffer + needed) > oci->size))
|
((oci->bufptr - oci->buffer + needed) > oci->size))
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,9 +55,6 @@ SOFTWARE.
|
||||||
#define BOTIMEOUT 200 /* in milliseconds */
|
#define BOTIMEOUT 200 /* in milliseconds */
|
||||||
#define BUFSIZE 4096
|
#define BUFSIZE 4096
|
||||||
#define BUFWATERMARK 8192
|
#define BUFWATERMARK 8192
|
||||||
#ifndef MAXBUFSIZE
|
|
||||||
#define MAXBUFSIZE (1 << 22)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <X11/Xdmcp.h>
|
#include <X11/Xdmcp.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user