VirtualBox

Changeset 82628 in vbox for trunk/src


Ignore:
Timestamp:
Dec 20, 2019 1:41:17 PM (5 years ago)
Author:
vboxsync
Message:

VBoxSharedClipboardSvc: If guest provided zero bytes, we get no payload. bugref:9631

Location:
trunk/src/VBox/HostServices/SharedClipboard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r82527 r82628  
    186186        if (RT_SUCCESS(rc))
    187187        {
    188             *ppvData = pPayload->pvData;
    189             *pcbData = pPayload->cbData;
     188            *ppvData = pPayload ? pPayload->pvData : NULL;
     189            *pcbData = pPayload ? pPayload->cbData : 0;
    190190
    191191            /* Detach the payload, as the caller then will own the data. */
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r82539 r82628  
    348348            if (RT_SUCCESS(rc))
    349349            {
    350                 *ppv = pPayload->pvData;
    351                 *pcb = pPayload->cbData;
     350                *ppv = pPayload ? pPayload->pvData : NULL;
     351                *pcb = pPayload ? pPayload->cbData : 0;
    352352
    353353                /* Detach the payload, as the caller then will own the data. */
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