mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 02:08:09 +08:00
fix: parse_ml_literal_string() properly issues invalid-utf8 errors
Fix the same out-of-bounds read as in parse_literal_string().
This commit is contained in:
@@ -588,7 +588,8 @@ parse_ml_literal_string(location& loc)
|
||||
const auto first = loc.iter();
|
||||
if(const auto token = lex_ml_literal_string::invoke(loc))
|
||||
{
|
||||
location inner_loc(loc.name(), token.unwrap().str());
|
||||
auto inner_loc = loc;
|
||||
inner_loc.reset(first);
|
||||
|
||||
const auto open = lex_ml_literal_string_open::invoke(inner_loc);
|
||||
if(!open)
|
||||
|
Reference in New Issue
Block a user