Reserve space for The Terminator

svn path=/trunk/; revision=17739
This commit is contained in:
Gé van Geldorp 2005-09-08 13:08:21 +00:00
parent f2854a8641
commit 9bec9db6c6

View file

@ -218,7 +218,7 @@ BOOL IniAddSettingValueToSection(ULONG SectionId, PCHAR SettingName, PCHAR Setti
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 @@ BOOL IniAddSettingValueToSection(ULONG SectionId, PCHAR SettingName, PCHAR Setti
}
// Allocate the setting value buffer
SectionItem->ItemValue = MmAllocateMemory(strlen(SettingValue));
SectionItem->ItemValue = MmAllocateMemory(strlen(SettingValue) + 1);
if (!SectionItem->ItemValue)
{
MmFreeMemory(SectionItem->ItemName);