--- old/src/share/classes/com/sun/jndi/ldap/BerDecoder.java Thu May 16 02:02:54 2013 +++ new/src/share/classes/com/sun/jndi/ldap/BerDecoder.java Thu May 16 02:02:52 2013 @@ -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; --- old/src/share/classes/com/sun/jndi/ldap/BerEncoder.java Thu May 16 02:02:59 2013 +++ new/src/share/classes/com/sun/jndi/ldap/BerEncoder.java Thu May 16 02:02:57 2013 @@ -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. } /** --- old/src/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java Thu May 16 02:03:04 2013 +++ new/src/share/classes/com/sun/jndi/ldap/ext/StartTlsResponseImpl.java Thu May 16 02:03:02 2013 @@ -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(); } /**