Commit ac5b0251 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Do not pass an invalid target buffer info to WideCharToMultiByte.

parent 30428b5a
......@@ -373,9 +373,9 @@ static void intern_atoms(void)
for (format = ClipFormats, i = 0; format; format = format->NextFormat) {
if (!format->drvData) {
len = WideCharToMultiByte(CP_UNIXCP, 0, format->Name, -1, NULL, -1, 0, 0);
names[i] = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
WideCharToMultiByte(CP_UNIXCP, 0, format->Name, -1, names[i++], len, 0, 0);
len = WideCharToMultiByte(CP_UNIXCP, 0, format->Name, -1, NULL, 0, NULL, NULL);
names[i] = HeapAlloc(GetProcessHeap(), 0, len);
WideCharToMultiByte(CP_UNIXCP, 0, format->Name, -1, names[i++], len, NULL, NULL);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment