Changeset 5864 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Nov 28, 2007 3:38:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedClipboard/linux.cpp
r5805 r5864 1307 1307 return rc; 1308 1308 } 1309 /* Allocate as much space as the Utf16 string takes up, as RTUtf16ToUtf8Ex may fail if the1309 /* Allocate enough space, as RTUtf16ToUtf8Ex may fail if the 1310 1310 space is too tightly calculated. */ 1311 pu8DestText = XtMalloc(cwDestLen * 2);1311 pu8DestText = XtMalloc(cwDestLen * 4); 1312 1312 if (pu8DestText == 0) 1313 1313 { 1314 LogRel (("vboxClipboardConvertUtf8: failed to allocate %d bytes\n", cwDestLen * 2));1314 LogRel (("vboxClipboardConvertUtf8: failed to allocate %d bytes\n", cwDestLen * 4)); 1315 1315 RTMemFree(reinterpret_cast<void *>(pu16DestText)); 1316 1316 vboxClipboardEmptyGuestBuffer(); … … 1318 1318 } 1319 1319 /* Convert the Utf16 string to Utf8. */ 1320 rc = RTUtf16ToUtf8Ex(pu16DestText + 1, cwDestLen - 1, &pu8DestText, cwDestLen * 2,1320 rc = RTUtf16ToUtf8Ex(pu16DestText + 1, cwDestLen - 1, &pu8DestText, cwDestLen * 4, 1321 1321 &cbDestLen); 1322 1322 RTMemFree(reinterpret_cast<void *>(pu16DestText));
Note:
See TracChangeset
for help on using the changeset viewer.