commit | 7285a4bc7337cf6382ac464b979ae5db986a2a53 | [log] [tgz] |
---|---|---|
author | Orion Hodson <oth@google.com> | Fri Jul 10 13:31:35 2020 +0100 |
committer | Orion Hodson <oth@google.com> | Fri Jul 10 18:18:48 2020 +0000 |
tree | b2cf6bf95ec431a2f7bb0d4c049aac3b737ef43d | |
parent | 8070443ce4b31a6787c22490f18f838f8f6ed4be [diff] |
Fix GetDirectBufferCapacity for zero length direct buffer It is possible to create a direct buffer that has a null address and zero size, e.g. mapping a FileChannel on a zero-length file. In this case, GetDirectBufferCapacity() should return zero rather than -1. Bug: 122025675 Test: art/test/run-test --host 2036-jni-filechannel Test: art/test.py --target -r -t 2036-jni-filechannel Test: art_runtime_tests Change-Id: If615025385a8dfad00d815da128dfde19d2ddbc2