diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/binary-reader.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/binary-reader.cc b/src/binary-reader.cc index 2ccda33a..a28a0ad9 100644 --- a/src/binary-reader.cc +++ b/src/binary-reader.cc @@ -587,6 +587,8 @@ Result BinaryReader::ReadMemory(Limits* out_page_limits) { ERROR_UNLESS(unknown_flags == 0, "malformed memory limits flag: %d", flags); ERROR_IF(is_shared && !options_.features.threads_enabled(), "memory may not be shared: threads not allowed"); + ERROR_IF(is_64 && !options_.features.memory64_enabled(), + "memory64 not allowed"); CHECK_RESULT(ReadU32Leb128(&initial, "memory initial page count")); if (has_max) { CHECK_RESULT(ReadU32Leb128(&max, "memory max page count")); |