mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-03 12:40:10 +00:00
8010814: More buffers are stored or returned without cloning
Reviewed-by: lancea
This commit is contained in:
parent
9b4403735d
commit
9681f58b21
@ -42,7 +42,7 @@ public final class BerDecoder extends Ber {
|
||||
*/
|
||||
public BerDecoder(byte buf[], int offset, int bufsize) {
|
||||
|
||||
this.buf = buf;
|
||||
this.buf = buf; // shared buffer, be careful to use this class
|
||||
this.bufsize = bufsize;
|
||||
this.origOffset = offset;
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ public final class BerEncoder extends Ber {
|
||||
if (curSeqIndex != 0) {
|
||||
throw new IllegalStateException("BER encode error: Unbalanced SEQUENCEs.");
|
||||
}
|
||||
return buf;
|
||||
return buf; // shared buffer, be careful to use this method.
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -134,7 +134,9 @@ final public class StartTlsResponseImpl extends StartTlsResponse {
|
||||
* @see #negotiate
|
||||
*/
|
||||
public void setEnabledCipherSuites(String[] suites) {
|
||||
this.suites = suites;
|
||||
// The impl does accept null suites, although the spec requires
|
||||
// a non-null list.
|
||||
this.suites = suites == null ? null : suites.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user