summaryrefslogtreecommitdiff
path: root/test/binary/bad-subsection-size.txt
diff options
context:
space:
mode:
authorBen Smith <binjimin@gmail.com>2018-03-28 16:04:25 -0700
committerGitHub <noreply@github.com>2018-03-28 16:04:25 -0700
commit2e44cbbd9cabe19d9dfab50c3950c5a4ff0ea4df (patch)
tree1dc5ac35fec1a95d8d943679f5b8ea49cfbf23c8 /test/binary/bad-subsection-size.txt
parent8b192e6a441ad22207d95486ba5b34030188c455 (diff)
downloadwabt-2e44cbbd9cabe19d9dfab50c3950c5a4ff0ea4df.tar.gz
wabt-2e44cbbd9cabe19d9dfab50c3950c5a4ff0ea4df.tar.bz2
wabt-2e44cbbd9cabe19d9dfab50c3950c5a4ff0ea4df.zip
Use `ReadCount` function in BinaryReader (#821)
See https://github.com/WebAssembly/wabt/issues/760 for more info. We assume that a count precedes a list of items that are at least one byte that are all contained in the same section. As a result, we can do an up-front check to prevent over-allocation. This is the same technique that the spec interpreter uses.
Diffstat (limited to 'test/binary/bad-subsection-size.txt')
-rw-r--r--test/binary/bad-subsection-size.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/binary/bad-subsection-size.txt b/test/binary/bad-subsection-size.txt
index a1c35137..6ad1a25e 100644
--- a/test/binary/bad-subsection-size.txt
+++ b/test/binary/bad-subsection-size.txt
@@ -18,6 +18,6 @@ section("name") {
str("$F0")
}
(;; STDERR ;;;
-0000027: error: unable to read u32 leb128: function index
-0000027: error: unable to read u32 leb128: function index
+0000027: error: invalid name count 1, only 0 bytes left in section
+0000027: error: invalid name count 1, only 0 bytes left in section
;;; STDERR ;;)