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);
Show replies by date