[PATCH] os: Reset input buffer's 'ignoreBytes' field
Peter Hutterer
peter.hutterer at who-t.net
Thu May 9 16:03:16 PDT 2013
On Thu, May 09, 2013 at 01:09:02PM -0700, Robert Morell wrote:
> 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: Robert Morell <rmorell at nvidia.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
and merged into my branch, thank you.
Cheers,
Peter
> ---
> os/io.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/os/io.c b/os/io.c
> index 2f091c4..0d980ab 100644
> --- a/os/io.c
> +++ b/os/io.c
> @@ -1063,6 +1063,7 @@ FreeOsBuffers(OsCommPtr oc)
> oci->bufptr = oci->buffer;
> oci->bufcnt = 0;
> oci->lenLastReq = 0;
> + oci->ignoreBytes = 0;
> }
> }
> if ((oco = oc->output)) {
> --
> 1.8.1.5
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
More information about the xorg-devel
mailing list