mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +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
Notes:
sideshowbarker
2024-07-17 10:54:57 +09:00
Author: https://github.com/Lubrsi
Commit: 805e6593b9
Pull-request: https://github.com/SerenityOS/serenity/pull/15833
1 changed files with 9 additions and 0 deletions
|
@ -1887,6 +1887,15 @@ VALIDATE_INSTRUCTION(memory_fill)
|
|||
return {};
|
||||
}
|
||||
|
||||
VALIDATE_INSTRUCTION(memory_copy)
|
||||
{
|
||||
TRY(validate(MemoryIndex { 0 }));
|
||||
|
||||
TRY((stack.take<ValueType::I32, ValueType::I32, ValueType::I32>()));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
VALIDATE_INSTRUCTION(memory_init)
|
||||
{
|
||||
TRY(validate(MemoryIndex { 0 }));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue