Index: runtime/bin/file_linux.cc |
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc |
index 3c421cee0622a7bc4b9e93f7eea732a26a77db12..ee6765731105db61bc6d2a5c954bc6e719295d2e 100644 |
--- a/runtime/bin/file_linux.cc |
+++ b/runtime/bin/file_linux.cc |
@@ -81,6 +81,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: |