diff --git a/os/io.c b/os/io.c index 835af54d9..9de75eeaa 100644 --- a/os/io.c +++ b/os/io.c @@ -304,12 +304,14 @@ ReadRequestFromClient(ClientPtr client) */ oci->lenLastReq = 0; - if (needed > MAXBUFSIZE) +#ifdef BIGREQS + if (needed > maxBigRequestSize << 2) { /* request is too big for us to handle */ YieldControlDeath(); return -1; } +#endif if ((gotnow == 0) || ((oci->bufptr - oci->buffer + needed) > oci->size)) { diff --git a/os/osdep.h b/os/osdep.h index 965436df5..2d455aa67 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -55,9 +55,6 @@ SOFTWARE. #define BOTIMEOUT 200 /* in milliseconds */ #define BUFSIZE 4096 #define BUFWATERMARK 8192 -#ifndef MAXBUFSIZE -#define MAXBUFSIZE (1 << 22) -#endif #include