mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
LibWasm: Add missing validation for memory.copy
This has the exact same validation as memory.fill
This commit is contained in:
parent
2ef1e7e634
commit
805e6593b9
1 changed files with 9 additions and 0 deletions
|
@ -1887,6 +1887,15 @@ VALIDATE_INSTRUCTION(memory_fill)
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALIDATE_INSTRUCTION(memory_copy)
|
||||||
|
{
|
||||||
|
TRY(validate(MemoryIndex { 0 }));
|
||||||
|
|
||||||
|
TRY((stack.take<ValueType::I32, ValueType::I32, ValueType::I32>()));
|
||||||
|
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
VALIDATE_INSTRUCTION(memory_init)
|
VALIDATE_INSTRUCTION(memory_init)
|
||||||
{
|
{
|
||||||
TRY(validate(MemoryIndex { 0 }));
|
TRY(validate(MemoryIndex { 0 }));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue