xserver-multidpi/os
Aaron Plattner cf88363db0 os: Return BadLength instead of disconnecting BigReq clients (#4565)
If a client sends a big request that's too big (i.e. bigger than
maxBigRequestSize << 2 bytes), the server just disconnects it.  This makes the
client receive SIGPIPE the next time it tries to send something.

The X Test Suite sends requests that are too big when the test specifies the
TOO_LONG test type.  When the client receives SIGPIPE, XTS marks it as
UNRESOLVED, which counts as a failure.

Instead, remember how long the request is supposed to be and then return that
size.  Dispatch() checks the length and sends BadLength to the client.  Then,
whenever oci->ignoreBytes is nonzero, ignore the data read instead of trying to
process it as a request.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-10 11:48:17 -07:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
access.c Don't crash when asked if a client that has disconnected was local 2010-06-22 11:42:33 -07:00
auth.c Constify function prototypes in auth & xdmcp code 2010-05-07 12:22:58 -07:00
backtrace.c Miscellaneous compilation warning fixes 2009-12-08 15:50:28 -08:00
connection.c Always call the flush callback chain when we flush client buffers 2010-08-06 08:28:10 -04:00
io.c os: Return BadLength instead of disconnecting BigReq clients (#4565) 2010-09-10 11:48:17 -07:00
log.c XQuartz: Fix a build failure on Tiger 2010-05-16 13:12:31 -07:00
Makefile.am os: Prevent backtrace from being stopped in noreturn functions. 2010-03-25 06:03:43 +01:00
mitauth.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
oscolor.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
osdep.h os: Return BadLength instead of disconnecting BigReq clients (#4565) 2010-09-10 11:48:17 -07:00
osinit.c Turn sprintf argument into literaral string, shutting up gcc warning 2010-05-13 04:53:57 +07:00
rpcauth.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
strcasecmp.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
strcasestr.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
strlcat.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
strlcpy.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
utils.c os: Remove unused dev_tty_from_init variable 2010-06-20 05:36:22 +07:00
WaitFor.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xdmauth.c Replace deprecated bzero with memset 2010-06-06 15:07:27 +07:00
xdmcp.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
xprintf.c Use lowercase variant of XNFalloc and Xstrdup 2010-05-13 00:22:37 +07:00
xsha1.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xstrans.c Change HAVE_CONFIG_H to HAVE_DIX_CONFIG_H. 2005-07-03 12:16:29 +00:00