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 67c2aa070152ce8f09feebc5a5fb23695281f055
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/Core/Common/IniFile.cpp
@@ -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.
You can’t perform that action at this time.