diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2019-05-23 12:12:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-23 12:12:41 +0200 |
| commit | 67c2aa070152ce8f09feebc5a5fb23695281f055 (patch) | |
| tree | f15913ce829eb87cfa058d609cb330adf4b797fa /Source/Core/Common/IniFile.cpp | |
| parent | 3132839113fde2078be4ee60bf8dbf5f15ce16cd (diff) | |
| parent | 2ae370fc371e14a3f4d7765cf361a0a911452471 (diff) | |
Merge pull request #8114 from lioncash/ini-line
IniFile: Prevent potential out-of-bounds access in ParseLine()
Diffstat (limited to 'Source/Core/Common/IniFile.cpp')
| -rw-r--r-- | Source/Core/Common/IniFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/IniFile.cpp b/Source/Core/Common/IniFile.cpp index 43bbe7b50b..c0e07df483 100644 --- a/Source/Core/Common/IniFile.cpp +++ b/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('='); |
