mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-02 12:30:31 +00:00
keymap: Fix crash introduced by 637ecdb
Just because a Vector has some inline capacity doesn't mean we can put data at offsets < Vector::size(). Fixes #2104.
This commit is contained in:
parent
454c1e6bbe
commit
7dd49047f3
Notes:
sideshowbarker
2024-07-19 06:59:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7dd49047f38
1 changed files with 1 additions and 0 deletions
|
@ -44,6 +44,7 @@ static Vector<char> read_map(const JsonObject& json, const String& name)
|
|||
return {};
|
||||
|
||||
Vector<char, 0x80> map;
|
||||
map.resize(0x80);
|
||||
auto map_arr = json.get(name).as_array();
|
||||
|
||||
for (int i = 0; i < map_arr.size(); i++) {
|
||||
|
|
Loading…
Reference in a new issue