[wasm] Check for UTF-8 validity of section names
According to the spec, section names must be valid UTF-8. This CL adds a check for that. Imported and exported names were already checked before. In order to use the {consume_string} function from the WasmSectionIterator, it moved it out of the ModuleDecoder into the anonymous namespace. It now also gets a name for the string to be parsed, for better error messages. R=rossberg@chromium.org Change-Id: I20b1ddb0bd1c7ada237d8303951073310fe1c714 Reviewed-on: https://chromium-review.googlesource.com/470207 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Andreas Rossberg <rossberg@chromium.org> Cr-Commit-Position: refs/heads/master@{#44550}
Showing
Please
register
or
sign in
to comment