Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Fix loading fixed length lists from memory (#13985)

Alex Crichton8e48f8f1c819
diff --git a/crates/wasmtime/src/runtime/component/values.rs b/crates/wasmtime/src/runtime/component/values.rs
index 1a94b1bdd7..36bc6892b6 100644
--- a/crates/wasmtime/src/runtime/component/values.rs
+++ b/crates/wasmtime/src/runtime/component/values.rs
@@ -367,7 +367,7 @@ impl Val {
match number_elements.checked_mul(element_size) {
Some(total_size) if total_size <= bytes.len() => {
cx.consume_fuel_array(number_elements, size_of::<Val>())?;
- Val::Tuple(
+ Val::FixedLengthList(
(0..number_elements)
.map(|n| {
// the match already checked that the whole array fits into usize