Skip to content
Permalink
Browse files
Merge pull request #8114 from lioncash/ini-line
IniFile: Prevent potential out-of-bounds access in ParseLine()
  • Loading branch information
leoetlino committed May 23, 2019
2 parents 3132839 + 2ae370f commit 67c2aa0
Showing 1 changed file with 1 addition and 1 deletion.
@@ -20,7 +20,7 @@

void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut)
{
if (line[0] == '#')
if (line.empty() || line.front() == '#')
return;

size_t firstEquals = line.find('=');

0 comments on commit 67c2aa0

Please sign in to comment.