Skip to content

Commit 0279a8c

Browse files
authored
[GEN][ZH] Fix using uninitialized memory 'buff' in INI::getNextQuotedAsciiString() (#1097)
1 parent f7f26a4 commit 0279a8c

File tree

2 files changed

+2
-0
lines changed
  • GeneralsMD/Code/GameEngine/Source/Common/INI
  • Generals/Code/GameEngine/Source/Common/INI

2 files changed

+2
-0
lines changed

Generals/Code/GameEngine/Source/Common/INI/INI.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ AsciiString INI::getNextQuotedAsciiString()
725725
{
726726
AsciiString result;
727727
char buff[INI_MAX_CHARS_PER_LINE];
728+
buff[0] = '\0';
728729

729730
const char *token = getNextTokenOrNull(); // if null, just leave an empty string
730731
if (token != NULL)

GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ AsciiString INI::getNextQuotedAsciiString()
717717
{
718718
AsciiString result;
719719
char buff[INI_MAX_CHARS_PER_LINE];
720+
buff[0] = '\0';
720721

721722
const char *token = getNextTokenOrNull(); // if null, just leave an empty string
722723
if (token != NULL)

0 commit comments

Comments
 (0)