Author: jmorlan
Date: Thu Jul 24 17:08:50 2008
New Revision: 34763
URL:
http://svn.reactos.org/svn/reactos?rev=34763&view=rev
Log:
Fix crash in NtUserSetClipboardData with CF_TEXT format. (Bug 3536)
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/clipboard.c [iso-8859-1] Thu Jul 24
17:08:50 2008
@@ -922,7 +922,9 @@
{
//TODO : sinthesize CF_UNICODETEXT & CF_OEMTEXT
// CF_TEXT -> CF_UNICODETEXT
- RtlAnsiStringToUnicodeString(&unicodeString, hCBData, TRUE);
+ ansiString.Buffer = hCBData;
+ ansiString.Length = size;
+ RtlAnsiStringToUnicodeString(&unicodeString, &ansiString,
TRUE);
intAddFormatedData(CF_UNICODETEXT, unicodeString.Buffer,
unicodeString.Length * sizeof(WCHAR));
// CF_TEXT -> CF_OEMTEXT
RtlUnicodeStringToOemString(&oemString, &unicodeString,
TRUE);