Index: test/unittests/wasm/module-decoder-unittest.cc |
diff --git a/test/unittests/wasm/module-decoder-unittest.cc b/test/unittests/wasm/module-decoder-unittest.cc |
index 5c9c47ba00e075c8533cd12b3dd47d8b1f043247..03aa57c71ef368e7eda8f3fa71d01042c2f5536e 100644 |
--- a/test/unittests/wasm/module-decoder-unittest.cc |
+++ b/test/unittests/wasm/module-decoder-unittest.cc |
@@ -279,6 +279,18 @@ TEST_F(WasmModuleVerifyTest, GlobalWithInvalidNameOffset) { |
EXPECT_FAILURE(data); |
} |
+TEST_F(WasmModuleVerifyTest, GlobalWithInvalidNameLength) { |
+ static const byte data[] = { |
+ SECTION(GLOBALS, 5), // -- |
+ 1, |
+ NAME_LENGTH(56), // invalid length |
+ 'g', // name |
+ kLocalI32, // memory type |
+ 0, // exported |
+ }; |
+ EXPECT_FAILURE(data); |
+} |
+ |
TEST_F(WasmModuleVerifyTest, GlobalWithInvalidMemoryType) { |
static const byte data[] = { |
SECTION(GLOBALS, 7), |