VirtualBox

Changeset 13521 in vbox


Ignore:
Timestamp:
Oct 23, 2008 9:18:47 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38357
Message:

Window guest clipboard fix: correctly process 0 bytes length returned from host.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp

    r13493 r13521  
    417417                        if (VBOX_SUCCESS (vboxrc))
    418418                        {
    419                             if (cb > cbPrealloc)
     419                            if (cb == 0)
     420                            {
     421                                /* 0 bytes returned means the clipboard is empty.
     422                                 * Deallocate the memory and set hMe to NULL to get to
     423                                 * the clipboard empty code path.
     424                                 */
     425                                GlobalUnlock (pMem);
     426                                GlobalFree (hMem);
     427                                hMem = NULL;
     428                            }
     429                            else if (cb > cbPrealloc)
    420430                            {
    421431                                GlobalUnlock (hMem);
Note: See TracChangeset for help on using the changeset viewer.

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