Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2113)

Unified Diff: src/wasm/module-decoder.cc

Issue 2648383007: [wasm] Decoding the names section should stop if there is a problem with locals. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/decoder.h ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index 2a4752e0f6f5771c32bdb798bed18af1bea4e04b..344196f9eebc7f76c3f5e154ca107e8edc3ceeed 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -626,7 +626,7 @@ class ModuleDecoder : public Decoder {
}
uint32_t local_names_count = inner.consume_u32v("local names count");
- for (uint32_t j = 0; ok() && j < local_names_count; j++) {
+ for (uint32_t j = 0; inner.ok() && j < local_names_count; j++) {
uint32_t length = inner.consume_u32v("string length");
inner.consume_bytes(length, "string");
}
« no previous file with comments | « src/wasm/decoder.h ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698