mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 21:35:28 +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)
|
||||
{
|
||||
if (line[0] == '#')
|
||||
if (line.empty() || line.front() == '#')
|
||||
return;
|
||||
|
||||
size_t firstEquals = line.find('=');
|
||||
|
Loading…
x
Reference in New Issue
Block a user