diff options
Diffstat (limited to 'src/binary-reader.cc')
-rw-r--r-- | src/binary-reader.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/binary-reader.cc b/src/binary-reader.cc index 75dfe01b..e377ae08 100644 --- a/src/binary-reader.cc +++ b/src/binary-reader.cc @@ -1899,6 +1899,7 @@ Result BinaryReader::ReadCodeSection(Offset section_size) { for (Index k = 0; k < num_local_decls; ++k) { Index num_local_types; CHECK_RESULT(ReadIndex(&num_local_types, "local type count")); + ERROR_UNLESS(num_local_types > 0, "local count must be > 0"); Type local_type; CHECK_RESULT(ReadType(&local_type, "local type")); ERROR_UNLESS(is_concrete_type(local_type), "expected valid local type"); |