mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Merge pull request #8114 from lioncash/ini-line
IniFile: Prevent potential out-of-bounds access in ParseLine()
This commit is contained in:
@ -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('=');
|
||||||
|
Reference in New Issue
Block a user