8191025: (ch) Scattering reads to a subsequence of buffers ignores length

Use length parameter instead of the buffer array length

Reviewed-by: rriggs, alanb
This commit is contained in:
Brian Burkhalter 2017-11-09 13:30:03 -08:00
parent ccdb0ef8e2
commit 1ca74d0d2e
2 changed files with 25 additions and 3 deletions

View file

@ -297,7 +297,7 @@ public class IOUtil {
NativeDispatcher nd)
throws IOException
{
return read(fd, bufs, offset, bufs.length, false, -1, nd);
return read(fd, bufs, offset, length, false, -1, nd);
}
static long read(FileDescriptor fd, ByteBuffer[] bufs, int offset, int length,