VirtualBox

Changeset 19220 in vbox for trunk/src/VBox/Additions/x11


Ignore:
Timestamp:
Apr 27, 2009 3:54:13 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46589
Message:

SharedClipboard/x11: fix a potential crash if a zero-length compound text string is read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp

    r19150 r19220  
    390390    LogFlow(("vboxClipboardGetCText: converting compound text to Utf-16LE. Original is %.*s\n",
    391391           cbSourceLen, pValue));
     392    /* Quick fix for 2.2. */
     393    if (cbSourceLen == 0)
     394    {
     395        XtFree(reinterpret_cast<char *>(pValue));
     396        vboxClipboardSendData(VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT,
     397                              NULL, 0);       
     398    }
    392399    /* First convert the compound text to Utf8 */
    393400    property.value = reinterpret_cast<unsigned char *>(pValue);
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