Skip to content
Browse files

IniFile: Prevent potential out-of-bounds access in ParseLine()

While current usages of ParseLine aren't problematic, this is still a
public function that can be used for other purposes. Essentially makes
the function handle potential external inputs a little nicer.
  • Loading branch information...
lioncash committed May 23, 2019
1 parent e2c769a commit 2ae370fc371e14a3f4d7765cf361a0a911452471
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() == '#')

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

0 comments on commit 2ae370f

Please sign in to comment.
You can’t perform that action at this time.