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 03aa57c71ef368e7eda8f3fa71d01042c2f5536e..6716ed766ab45222b8b5e083c9b070bee255e4e9 100644 |
--- a/test/unittests/wasm/module-decoder-unittest.cc |
+++ b/test/unittests/wasm/module-decoder-unittest.cc |
@@ -1023,6 +1023,20 @@ TEST_F(WasmModuleVerifyTest, ExportTableOne) { |
if (result.val) delete result.val; |
} |
+TEST_F(WasmModuleVerifyTest, ExportNameWithInvalidStringLength) { |
+ static const byte data[] = {// signatures |
+ SIGNATURES_SECTION_VOID_VOID, |
+ ONE_EMPTY_FUNCTION, |
+ SECTION(EXPORT_TABLE, 12), |
+ 1, // exports |
+ FUNC_INDEX(0), // -- |
+ NAME_LENGTH(84), // invalid string length |
+ 'e', // -- |
+ ONE_EMPTY_BODY}; |
+ |
+ EXPECT_FAILURE(data); |
+} |
+ |
TEST_F(WasmModuleVerifyTest, ExportTableTwo) { |
static const byte data[] = {// signatures |
SIGNATURES_SECTION_VOID_VOID, |