Commit 143f0753 authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

FormatMessageW: Allocate anough space.

parent 717107bb
......@@ -468,7 +468,7 @@ DWORD WINAPI FormatMessageW(
sprintf(fmtstr,"%%%s",f);
f=x+1;
} else {
fmtstr=HeapAlloc(GetProcessHeap(),0,strlen(f));
fmtstr=HeapAlloc(GetProcessHeap(),0,strlen(f)+2);
sprintf(fmtstr,"%%%s",f);
f+=strlen(f); /*at \0*/
}
......
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