[Janitorial] Another strlen/HeapAlloc glitch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog
	dll/kerne;/format_msg.c FormatMessageW()
	Allocate anough space
-- 
Uwe Bonnes                bon@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*/
                             }


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux