mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-04 14:02:45 +01:00
time_zone_content_manager: Fix out of bounds read
There were cases where raw_data didn't contain enough space to hold the zero terminator. This was caught with -fsanitize=address.
This commit is contained in:
parent
56ea0f8acb
commit
ac7ee21331
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ static std::vector<std::string> BuildLocationNameCache(Core::System& system) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<char> raw_data(binary_list->GetSize());
|
std::vector<char> raw_data(binary_list->GetSize() + 1);
|
||||||
binary_list->ReadBytes<char>(raw_data.data(), binary_list->GetSize());
|
binary_list->ReadBytes<char>(raw_data.data(), binary_list->GetSize());
|
||||||
|
|
||||||
std::stringstream data_stream{raw_data.data()};
|
std::stringstream data_stream{raw_data.data()};
|
||||||
|
|
Loading…
Reference in a new issue