Index: src/wasm/module-decoder.cc |
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc |
index 2a4752e0f6f5771c32bdb798bed18af1bea4e04b..39ecc422a8f145e4e3c22c41d8bd93b9a6840355 100644 |
--- a/src/wasm/module-decoder.cc |
+++ b/src/wasm/module-decoder.cc |
@@ -620,7 +620,7 @@ class ModuleDecoder : public Decoder { |
uint32_t name_offset = |
consume_string(inner, &function_name_length, false); |
uint32_t func_index = i; |
- if (func_index < module->functions.size()) { |
+ if (inner.ok() && func_index < module->functions.size()) { |
bradn
2017/01/25 11:18:05
Ah I see.
Kind of goofy how this section is speced
titzer
2017/01/25 11:53:29
I'm OK with "best effort" if we just leave the nam
Mircea Trofin
2017/01/25 15:58:51
We should take a stance though and propose a PR on
Mircea Trofin
2017/01/25 16:42:00
Followed up with this PR, please take a look (incl
|
module->functions[func_index].name_offset = name_offset; |
module->functions[func_index].name_length = function_name_length; |
} |