Index: src/wasm/module-decoder.cc |
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc |
index cf855af21b2b6c7820d80e106be5bda2dfc2372e..c47aa351a3409209e7425989dda2314db8cbe815 100644 |
--- a/src/wasm/module-decoder.cc |
+++ b/src/wasm/module-decoder.cc |
@@ -467,6 +467,9 @@ class ModuleDecoder : public Decoder { |
error("global name is not valid utf8"); |
} |
global->type = consume_local_type(); |
+ if (global->type == kAstStmt) { |
+ error("invalid global type"); |
+ } |
global->offset = 0; |
global->exported = consume_u8("exported") != 0; |
} |