[ros-diffs] [gvg] 17739: Reserve space for The Terminator

gvg at svn.reactos.com gvg at svn.reactos.com
Thu Sep 8 15:08:24 CEST 2005


Reserve space for The Terminator
Modified: trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
  _____  

Modified: trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
--- trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
2005-09-08 08:38:16 UTC (rev 17738)
+++ trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
2005-09-08 13:08:21 UTC (rev 17739)
@@ -218,7 +218,7 @@

 	RtlZeroMemory(SectionItem, sizeof(INI_SECTION_ITEM));
 
 	// Allocate the setting name buffer
-	SectionItem->ItemName = MmAllocateMemory(strlen(SettingName));
+	SectionItem->ItemName = MmAllocateMemory(strlen(SettingName) +
1);
 	if (!SectionItem->ItemName)
 	{
 		MmFreeMemory(SectionItem);
@@ -226,7 +226,7 @@
 	}
 
 	// Allocate the setting value buffer
-	SectionItem->ItemValue = MmAllocateMemory(strlen(SettingValue));
+	SectionItem->ItemValue = MmAllocateMemory(strlen(SettingValue) +
1);
 	if (!SectionItem->ItemValue)
 	{
 		MmFreeMemory(SectionItem->ItemName);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050908/4a6a3237/attachment.html


More information about the Ros-diffs mailing list