--- a/jdk/src/share/classes/com/sun/jndi/ldap/BerDecoder.java Thu May 16 10:59:06 2013 +0100
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/BerDecoder.java Thu May 16 04:30:45 2013 -0700
@@ -42,7 +42,7 @@
*/
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;
--- a/jdk/src/share/classes/com/sun/jndi/ldap/BerEncoder.java Thu May 16 10:59:06 2013 +0100
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/BerEncoder.java Thu May 16 04:30:45 2013 -0700
@@ -99,7 +99,7 @@
if (curSeqIndex != 0) {
throw new IllegalStateException("BER encode error: Unbalanced SEQUENCEs.");
}
- return buf;
+ return buf; // shared buffer, be careful to use this method.
}
/**
--- a/jdk/src/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java Thu May 16 10:59:06 2013 +0100
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java Thu May 16 04:30:45 2013 -0700
@@ -134,7 +134,9 @@
* @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();
}
/**