From 81c126619b3386f1ba3364e1ede499300516e34f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 26 Feb 2018 15:24:25 -0800 Subject: [PATCH] Ignore unknown custom wasm sections. --- lib/wasm/src/module_translator.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs index d75f60a35e..d50031fb04 100644 --- a/lib/wasm/src/module_translator.rs +++ b/lib/wasm/src/module_translator.rs @@ -124,6 +124,10 @@ pub fn translate_module<'data>( } } } + ParserState::BeginSection { code: SectionCode::Custom { .. }, .. } => { + // Ignore unknown custom sections. + next_input = ParserInput::SkipSection; + } _ => return Err(String::from("wrong content in the preamble")), }; }