[Janitorial] Another strlen/HeapAlloc glitch
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Tue Oct 28 08:05:52 CST 2003
Changelog
dll/kerne;/format_msg.c FormatMessageW()
Allocate anough space
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/kernel/format_msg.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/format_msg.c,v
retrieving revision 1.27
diff -u -w -r1.27 format_msg.c
--- wine/dlls/kernel/format_msg.c 2 Jul 2003 04:37:26 -0000 1.27
+++ wine/dlls/kernel/format_msg.c 28 Oct 2003 13:28:23 -0000
@@ -461,7 +461,7 @@
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*/
}
More information about the wine-patches
mailing list