diff options
-rw-r--r-- | src/wasm/wasm-binary.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index dc97dbbc3..b76a789de 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -6865,7 +6865,11 @@ void WasmBinaryReader::visitSelect(Select* curr, uint8_t code) { size_t numTypes = getU32LEB(); std::vector<Type> types; for (size_t i = 0; i < numTypes; i++) { - types.push_back(getType()); + auto t = getType(); + if (!t.isConcrete()) { + throwError("bad select type"); + } + types.push_back(t); } curr->type = Type(types); } |