You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in MemoryUtil.memCopy methods. The methods checks if the the destination buffer has enough bytes to hold the remaining bytes from source. But the check is checking the opposite, it checks if the source has enough bytes to hold the dest buffer. If the dest buffer is the bigger one, this leads to a thrown exception.
public static void memCopy(ByteBuffer src, ByteBuffer dst) {
if (CHECKS) {
check(src, dst.remaining());
}
memCopy(memAddress(src), memAddress(dst), src.remaining());
}
should be:
public static void memCopy(ByteBuffer src, ByteBuffer dst) {
if (CHECKS) {
check(dst, src.remaining());
}
memCopy(memAddress(src), memAddress(dst), src.remaining());
}
This goes for all the variants.
The text was updated successfully, but these errors were encountered:
Environment
3.2.0
build 12
1.8.0_171
Windows
core
Description
There is a bug in MemoryUtil.memCopy methods. The methods checks if the the destination buffer has enough bytes to hold the remaining bytes from source. But the check is checking the opposite, it checks if the source has enough bytes to hold the dest buffer. If the dest buffer is the bigger one, this leads to a thrown exception.
should be:
This goes for all the variants.
The text was updated successfully, but these errors were encountered: