VirtualBox

Ignore:
Timestamp:
Sep 26, 2013 2:32:14 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89343
Message:

OS X host: shared clipboard service: fix potential SEGFAULT when working with UTF16 content.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp

    r43123 r48714  
    174174            {
    175175                Log(("Clipboard content is utf-16\n"));
    176                 rc = RTUtf16DupEx(&pwszTmp, (PRTUTF16)CFDataGetBytePtr(outData), 0);
     176
     177                PRTUTF16 pBytePtr = (PRTUTF16)CFDataGetBytePtr(outData);
     178                if (pBytePtr)
     179                    rc = RTUtf16DupEx(&pwszTmp, pBytePtr, 0);
     180                else
     181                    rc = VERR_INVALID_PARAMETER;
    177182            }
    178183            /* Second try is utf-8 */
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