mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibWasm: Respect instance.types() bounds
This commit is contained in:
parent
3c2bbd45cf
commit
e08f6a69b2
Notes:
github-actions[bot]
2024-12-09 11:31:30 +00:00
Author: https://github.com/shlyakpavel Commit: https://github.com/LadybirdBrowser/ladybird/commit/e08f6a69b2e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2838
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ namespace Wasm {
|
|||
Optional<FunctionAddress> Store::allocate(ModuleInstance& instance, Module const& module, CodeSection::Code const& code, TypeIndex type_index)
|
||||
{
|
||||
FunctionAddress address { m_functions.size() };
|
||||
if (type_index.value() > instance.types().size())
|
||||
if (type_index.value() >= instance.types().size())
|
||||
return {};
|
||||
|
||||
auto& type = instance.types()[type_index.value()];
|
||||
|
|
Loading…
Reference in a new issue