VirtualBox

Ignore:
Timestamp:
Dec 5, 2023 8:32:38 AM (14 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Make sure to check the event's rc when waiting for ShClX11ReadDataFromX11Async() to complete. bugref:10384

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r100684 r102461  
    23192319    PSHCLEVENTPAYLOAD pPayload = NULL;
    23202320    size_t            cbResp   = sizeof(SHCLX11RESPONSE);
    2321     PSHCLX11RESPONSE  pResp    = (PSHCLX11RESPONSE)RTMemAlloc(cbResp);
     2321    PSHCLX11RESPONSE  pResp    = (PSHCLX11RESPONSE)RTMemAllocZ(cbResp);
    23222322    if (pResp)
    23232323    {
     
    26152615        if (RT_SUCCESS(rc))
    26162616        {
     2617            int               rcEvent;
    26172618            PSHCLEVENTPAYLOAD pPayload;
    2618             rc = ShClEventWait(pEvent, msTimeout, &pPayload);
     2619            rc = ShClEventWaitEx(pEvent, msTimeout, &rcEvent, &pPayload);
    26192620            if (RT_SUCCESS(rc))
    26202621            {
     
    26322633                    ShClPayloadFree(pPayload);
    26332634                }
     2635                else /* No payload given; could happen on invalid / not-expected formats. */
     2636                    *pcbRead = 0;
    26342637            }
     2638            else if (rc == VERR_SHCLPB_EVENT_FAILED)
     2639                rc = rcEvent;
    26352640        }
    26362641    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette