diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-04-22 09:55:54 +0430 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-04-22 21:12:47 +0430 |
commit | 6760ea33a0b8bcdbe847948c48fd7cd3f4d0e98d (patch) | |
tree | 0fce0a3e9adc5fcbb3a144a6b8f95f720205a110 | |
parent | 6e07e742616eb1d98d4097f3f6275175a4069f98 (diff) | |
download | serenity-6760ea33a0b8bcdbe847948c48fd7cd3f4d0e98d.zip |
LibWasm: Make memory_grow validation push back the old memory size
-rw-r--r-- | Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp b/Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp index bfae046f22..a64d4958ea 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp @@ -1873,6 +1873,7 @@ VALIDATE_INSTRUCTION(memory_grow) { TRY(validate(MemoryIndex { 0 })); TRY((stack.take<ValueType::I32>())); + stack.append(ValueType(ValueType::I32)); return {}; } |