mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
RtlInitUnicodeString is only legal with nullterminated strings and also the string in initialized manually below...
svn path=/trunk/; revision=18488
This commit is contained in:
parent
a17ada0615
commit
819d130a5a
1 changed files with 2 additions and 1 deletions
|
@ -105,10 +105,11 @@ GetClipboardFormatNameA(UINT format, LPSTR lpszFormatName, int cchMaxCount)
|
|||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
return 0;
|
||||
}
|
||||
RtlInitUnicodeString(&FormatName, lpBuffer);
|
||||
|
||||
FormatName.Length = 0;
|
||||
FormatName.MaximumLength = cchMaxCount * sizeof(WCHAR);
|
||||
FormatName.Buffer = lpBuffer;
|
||||
|
||||
Length = NtUserGetClipboardFormatName(format, &FormatName, cchMaxCount);
|
||||
DPRINT("GetClipboardFormatNameA(%x): %S\n", format, lpBuffer);
|
||||
HEAP_strcpyWtoA(lpszFormatName, lpBuffer, Length);
|
||||
|
|
Loading…
Reference in a new issue