summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-06 10:32:05 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-06 10:32:05 -0800
commitf5322cdb712db7bd12b6133164e6c5f95edd1873 (patch)
treee04114d14d2aa431ce2ba233c4ecfa3e968facb0 /src/wasm-interpreter.h
parent9a565d05ebafca5dd24ba4316af7efdfa0175a38 (diff)
downloadbinaryen-f5322cdb712db7bd12b6133164e6c5f95edd1873.tar.gz
binaryen-f5322cdb712db7bd12b6133164e6c5f95edd1873.tar.bz2
binaryen-f5322cdb712db7bd12b6133164e6c5f95edd1873.zip
assert=>trap
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r--src/wasm-interpreter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index 25bdfd7d6..5483271c3 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -690,7 +690,7 @@ private:
if (memorySize < curr->offset) externalInterface->trap();
if (addr > memorySize - curr->offset) externalInterface->trap();
addr += curr->offset;
- assert(memorySize >= curr->bytes);
+ if (curr->bytes > memorySize) externalInterface->trap();
if (addr > memorySize - curr->bytes) externalInterface->trap();
return addr;
}