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

Unified Diff: test/unittests/wasm/leb-helper-unittest.cc

Issue 2052623003: [wasm] improve handling of malformed input (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add overflow check to BranchTableOperand Created 4 years, 6 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
Index: test/unittests/wasm/leb-helper-unittest.cc
diff --git a/test/unittests/wasm/leb-helper-unittest.cc b/test/unittests/wasm/leb-helper-unittest.cc
index ed9f0a325d20b06ef73f26ea6defd8b30fdbaf79..10b2d42e718eadd601ca060ed9f123085b1a3191 100644
--- a/test/unittests/wasm/leb-helper-unittest.cc
+++ b/test/unittests/wasm/leb-helper-unittest.cc
@@ -96,7 +96,7 @@ TEST_F(LEBHelperTest, sizeof_i32v) {
EXPECT_EQ(LEBHelper::sizeof_##name(val), \
static_cast<size_t>(ptr - buffer)); \
Decoder decoder(buffer, buffer + kSize); \
- int length = 0; \
+ unsigned length = 0; \
ctype result = decoder.checked_read_##name(buffer, 0, &length); \
EXPECT_EQ(val, result); \
EXPECT_EQ(LEBHelper::sizeof_##name(val), static_cast<size_t>(length)); \

Powered by Google App Engine
This is Rietveld 408576698