[#3375] Correctly calculate the endOffset when wrap multiple ByteBuffer
Motivation: We failed to correctly calculate the endOffset when wrap multiple ByteBuffer and so not wrapped everything when an offset > 0 is used. Modifications: Correctly calculate endOffset. Result: All ByteBuffers are correctly wrapped when offset > 0.
This commit is contained in:
parent
4bafb4f95b
commit
4619e88a7b
@ -427,7 +427,8 @@ public final class OpenSslEngine extends SSLEngine {
|
||||
|
||||
// There was no pending data in the network BIO -- encrypt any application data
|
||||
int bytesConsumed = 0;
|
||||
for (int i = offset; i < length; ++ i) {
|
||||
int endOffset = offset + length;
|
||||
for (int i = offset; i < endOffset; ++ i) {
|
||||
final ByteBuffer src = srcs[i];
|
||||
while (src.hasRemaining()) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user