• Robert Morell's avatar
    os: Reset input buffer's 'ignoreBytes' field · 57f6dbb3
    Robert Morell authored
    If a client sends a request larger than maxBigRequestSize, the server is
    supposed to ignore it.
    
    Before commit cf88363d, the server would simply disconnect the client.  After
    that commit, it attempts to gracefully ignore the request by remembering how
    long the client specified the request to be, and ignoring that many bytes.
    However, if a client sends a BigReq header with a large size and disconnects
    before actually sending the rest of the specified request, the server will
    reuse the ConnectionInput buffer without resetting the ignoreBytes field.  This
    makes the server ignore new X clients' requests.
    
    This fixes that behavior by resetting the ignoreBytes field when putting the
    ConnectionInput buffer back on the FreeInputs list.
    Signed-off-by: default avatarRobert Morell <rmorell@nvidia.com>
    Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 67c66606)
    57f6dbb3
Name
Last commit
Last update
..
.gitignore Loading commit data...
Makefile.am Loading commit data...
WaitFor.c Loading commit data...
access.c Loading commit data...
auth.c Loading commit data...
backtrace.c Loading commit data...
client.c Loading commit data...
connection.c Loading commit data...
io.c Loading commit data...
log.c Loading commit data...
mitauth.c Loading commit data...
oscolor.c Loading commit data...
osdep.h Loading commit data...
osinit.c Loading commit data...
rpcauth.c Loading commit data...
strcasecmp.c Loading commit data...
strcasestr.c Loading commit data...
strlcat.c Loading commit data...
strlcpy.c Loading commit data...
strndup.c Loading commit data...
utils.c Loading commit data...
xdmauth.c Loading commit data...
xdmcp.c Loading commit data...
xprintf.c Loading commit data...
xsha1.c Loading commit data...
xstrans.c Loading commit data...