< prev index next >
src/share/classes/com/sun/jndi/ldap/BerDecoder.java
Print this page
rev 13664 : 8139965: Hang seen when using com.sun.jndi.ldap.search.replyQueueSize
Reviewed-by: dfuchs
*** 184,199 ****
*<blockquote><pre>
* BER integer ::= tag length byte {byte}*
*</pre></blockquote>
*/
private int parseIntWithTag(int tag) throws DecodeException {
-
-
if (parseByte() != tag) {
throw new DecodeException("Encountered ASN.1 tag " +
! Integer.toString(buf[offset - 1] & 0xff) +
! " (expected tag " + Integer.toString(tag) + ")");
}
int len = parseLength();
if (len > 4) {
--- 184,203 ----
*<blockquote><pre>
* BER integer ::= tag length byte {byte}*
*</pre></blockquote>
*/
private int parseIntWithTag(int tag) throws DecodeException {
if (parseByte() != tag) {
+ // Ber could have been reset;
+ String s;
+ if (offset > 0) {
+ s = Integer.toString(buf[offset - 1] & 0xff);
+ } else {
+ s = "Empty tag";
+ }
throw new DecodeException("Encountered ASN.1 tag " +
! s + " (expected tag " + Integer.toString(tag) + ")");
}
int len = parseLength();
if (len > 4) {
< prev index next >