xserver/os
Aaron Plattner 0ca9f07f73 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>
(cherry picked from commit cf88363db0)
2010-09-30 16:23:13 -07:00
..
access.c Don't crash when asked if a client that has disconnected was local 2010-08-21 14:01:10 -07:00
auth.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
backtrace.c os: don't redefine GNU_SOURCE 2009-09-04 12:51:02 +10:00
connection.c XQuartz: Fix possible NULL dereference in ListenOnOpenFD 2010-04-15 14:13:22 -07:00
io.c os: Return BadLength instead of disconnecting BigReq clients (#4565) 2010-09-30 16:23:13 -07:00
log.c os: don't malloc memory in LogVMessageVerb. 2009-04-19 22:20:18 +10:00
Makefile.am Add platform tests for Dtrace linker magic 2009-10-07 17:24:03 -07:00
mitauth.c Remove a bunch of useless casts. 2009-01-22 02:11:16 -05: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-30 16:23:13 -07:00
osinit.c linux: Yet more malloc() avoidance for backtrace() 2009-08-20 15:43:55 -04:00
rpcauth.c Remove a bunch of useless casts. 2009-01-22 02:11:16 -05:00
strcasecmp.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
strcasestr.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
strlcat.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
strlcpy.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
utils.c os: state effect of -a and -t options more precisely 2010-01-19 17:36:10 +13:00
WaitFor.c Update to xextproto 7.0.99.1. 2009-07-15 17:00:05 +10:00
xdmauth.c Remove a bunch of useless casts. 2009-01-22 02:11:16 -05:00
xdmcp.c xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675) 2009-04-14 10:57:19 -04:00
xprintf.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
xstrans.c Change HAVE_CONFIG_H to HAVE_DIX_CONFIG_H. 2005-07-03 12:16:29 +00:00