[X2Go-Commits] [nx-libs] 40/219: os: fix BigReq ignoring when another request is pending

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:18 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit a736122f5712d5d1b3b798ace3583a101c0cdf61
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon May 27 15:42:11 2019 +0200

    os: fix BigReq ignoring when another request is pending
    
    Not sure how it came to this situation, but the following commit is
    partly contained in our version of the code. Some lines had not been
    removed, tough...
    
      commit c80c41767eb101e9dbd8393d8cca7764b4e248a4
      Author: Aaron Plattner <aplattner at nvidia.com>
      Date:   Mon Oct 25 22:01:32 2010 -0700
    
        os: Fix BigReq ignoring when another request is pending
    
        Commit cf88363db0ebb42df7cc286b85d30d7898aea840 fixed the handling of
        BigReq requests that are way too large and handles the case where the
        read() syscall returns a short read.  However, it neglected to handle
        the case where it returns a long read, which happens when the client
        has another request in the queue after the bogus large one.
    
        Handle the long read case by subtracting the smaller of 'needed' and
        'gotnow' from oci->ignoreBytes.  If needed < gotnow, simply subtract
        the two, leaving gotnow equal to the number of extra bytes read.
        Since the code immediately following the (oci->ignoreBytes > 0) block
        tries to handle the next request, advance oci->bufptr immediately
        instead of setting oci->lenLastReq and letting the next call to
        ReadRequestFromClient do it.
    
        Fixes the XTS pChangeKeyboardMapping-3 test.
    
                 CASES TESTS  PASS UNSUP UNTST NOTIU  WARN   FIP  FAIL UNRES  UNIN ABORT
        -Xproto    122   389   367     2    19     0     0     0     1     0     0     0
        +Xproto    122   389   368     2    19     0     0     0     0     0     0     0
    
        Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
        Reviewed-by: Adam Jackson <ajax at redhat.com>
        Signed-off-by: Keith Packard <keithp at keithp.com>
---
 nx-X11/programs/Xserver/os/io.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c
index ad1fdcd20..02a47f135 100644
--- a/nx-X11/programs/Xserver/os/io.c
+++ b/nx-X11/programs/Xserver/os/io.c
@@ -424,8 +424,6 @@ ReadRequestFromClient(ClientPtr client)
 
     if (oci->ignoreBytes > 0) {
 	assert(needed == oci->ignoreBytes || needed == oci->size);
-	oci->ignoreBytes -= gotnow;
-	needed = gotnow = 0;
 	/*
 	 * The _XSERVTransRead call above may return more or fewer bytes than we
 	 * want to ignore.  Ignore the smaller of the two sizes.

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list