diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
|---|---|---|
| committer | <> | 2014-05-08 15:03:54 +0000 |
| commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
| tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/HostServices/SharedClipboard | |
| parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
| download | VirtualBox-master.tar.gz | |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/HostServices/SharedClipboard')
9 files changed, 20 insertions, 11 deletions
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp b/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp index e10be746..153a1992 100644 --- a/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp +++ b/src/VBox/HostServices/SharedClipboard/VBoxClipboard-win.cpp @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2011 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; diff --git a/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h b/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h index 81f184be..df38bbed 100644 --- a/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h +++ b/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2011 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; diff --git a/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp b/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp index 62045eed..1809cf2d 100644 --- a/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp +++ b/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp @@ -173,14 +173,23 @@ int readFromPasteboard(PasteboardRef pPasteboard, uint32_t fFormat, void *pv, ui if (!(err = PasteboardCopyItemFlavorData(pPasteboard, itemID, kUTTypeUTF16PlainText, &outData))) { Log(("Clipboard content is utf-16\n")); - rc = RTUtf16DupEx(&pwszTmp, (PRTUTF16)CFDataGetBytePtr(outData), 0); + + PRTUTF16 pwszString = (PRTUTF16)CFDataGetBytePtr(outData); + if (pwszString) + rc = RTUtf16DupEx(&pwszTmp, pwszString, 0); + else + rc = VERR_INVALID_PARAMETER; } /* Second try is utf-8 */ else if (!(err = PasteboardCopyItemFlavorData(pPasteboard, itemID, kUTTypeUTF8PlainText, &outData))) { Log(("readFromPasteboard: clipboard content is utf-8\n")); - rc = RTStrToUtf16((const char*)CFDataGetBytePtr(outData), &pwszTmp); + const char *pszString = (const char *)CFDataGetBytePtr(outData); + if (pszString) + rc = RTStrToUtf16(pszString, &pwszTmp); + else + rc = VERR_INVALID_PARAMETER; } if (pwszTmp) { diff --git a/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h b/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h index 4e36ff1a..704d778e 100644 --- a/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h +++ b/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.h @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2008 Oracle Corporation + * Copyright (C) 2008-2010 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; diff --git a/src/VBox/HostServices/SharedClipboard/darwin.cpp b/src/VBox/HostServices/SharedClipboard/darwin.cpp index 1f7fe0ba..46442a46 100644 --- a/src/VBox/HostServices/SharedClipboard/darwin.cpp +++ b/src/VBox/HostServices/SharedClipboard/darwin.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2008 Oracle Corporation + * Copyright (C) 2008-2011 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; diff --git a/src/VBox/HostServices/SharedClipboard/service.cpp b/src/VBox/HostServices/SharedClipboard/service.cpp index 3070a032..413e772a 100644 --- a/src/VBox/HostServices/SharedClipboard/service.cpp +++ b/src/VBox/HostServices/SharedClipboard/service.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; diff --git a/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp b/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp index b994f627..50bfabb7 100644 --- a/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp +++ b/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp @@ -38,7 +38,7 @@ static void testSetMode(void) VBOXHGCMSVCFNTABLE table; uint32_t u32Mode; int rc; - + RTTestISub("Testing HOST_FN_SET_MODE"); rc = setupTable(&table); RTTESTI_CHECK_MSG_RETV(RT_SUCCESS(rc), ("rc=%Rrc\n", rc)); @@ -82,7 +82,7 @@ static void testSetHeadless(void) VBOXHGCMSVCFNTABLE table; bool fHeadless; int rc; - + RTTestISub("Testing HOST_FN_SET_HEADLESS"); rc = setupTable(&table); RTTESTI_CHECK_MSG_RETV(RT_SUCCESS(rc), ("rc=%Rrc\n", rc)); diff --git a/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp b/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp index 30633ec8..c3700256 100644 --- a/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp +++ b/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2011 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; diff --git a/src/VBox/HostServices/SharedClipboard/x11-stub.cpp b/src/VBox/HostServices/SharedClipboard/x11-stub.cpp index 45d681e0..bb928094 100644 --- a/src/VBox/HostServices/SharedClipboard/x11-stub.cpp +++ b/src/VBox/HostServices/SharedClipboard/x11-stub.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; |
