mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-28 00:35:34 +00:00
Merge pull request #8114 from lioncash/ini-line
IniFile: Prevent potential out-of-bounds access in ParseLine()
This commit is contained in:
commit
67c2aa0701
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut)
|
void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut)
|
||||||
{
|
{
|
||||||
if (line[0] == '#')
|
if (line.empty() || line.front() == '#')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
size_t firstEquals = line.find('=');
|
size_t firstEquals = line.find('=');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user