Index: runtime/bin/file_macos.cc |
diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc |
index 0c8d9d61c2ca7b9056124d9d96644065b8f962ee..c2015126e22036beb6760c9f862421c59d6dfc7f 100644 |
--- a/runtime/bin/file_macos.cc |
+++ b/runtime/bin/file_macos.cc |
@@ -83,6 +83,7 @@ bool File::IsClosed() { |
MappedMemory* File::Map(MapType type, int64_t position, int64_t length) { |
ASSERT(handle_->fd() >= 0); |
+ ASSERT(length > 0); |
int prot = PROT_NONE; |
switch (type) { |
case kReadOnly: |