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

Unified Diff: src/wasm/decoder.h

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 | « no previous file | src/wasm/module-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/decoder.h
diff --git a/src/wasm/decoder.h b/src/wasm/decoder.h
index afe8701779300f7251f6dcbecd450e1933500841..bfd14366e114633d9b2243c64cdcc11efe7acc2f 100644
--- a/src/wasm/decoder.h
+++ b/src/wasm/decoder.h
@@ -382,8 +382,10 @@ class Decoder {
int length = static_cast<int>(pc_ - pos);
if (pc_ == end && (b & 0x80)) {
+ TRACE("\n");
error(pc_ - 1, "varint too large");
} else if (length == 0) {
+ TRACE("\n");
error(pc_, "varint of length 0");
} else if (is_signed) {
if (length < kMaxLength) {
« no previous file with comments | « no previous file | src/wasm/module-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698