Integrated: 8299684: (bf) JNI direct buffer functions with large capacity behave unexpectedly

Brian Burkhalter bpb at openjdk.org
Mon Jan 23 17:22:39 UTC 2023


On Thu, 5 Jan 2023 22:25:19 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Remove cast in `JNI::NewDirectByteBuffer`of `long` capacity to `int`, modify the constructor in question to accept a `long` capacity, and verify in the constructor that the  capacity does not overflow `int` range, throwing IAE If it does.

This pull request has now been integrated.

Changeset: a56598f5
Author:    Brian Burkhalter <bpb at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/a56598f5a534cc9223367e7faa8433ea38661db9
Stats:     221 lines in 5 files changed: 212 ins; 3 del; 6 mod

8299684: (bf) JNI direct buffer functions with large capacity behave unexpectedly

Reviewed-by: dholmes, alanb

-------------

PR: https://git.openjdk.org/jdk/pull/11873


More information about the nio-dev mailing list