directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r448550 - /directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
Date Thu, 21 Sep 2006 13:41:38 GMT
Author: elecharny
Date: Thu Sep 21 06:41:37 2006
New Revision: 448550

URL: http://svn.apache.org/viewvc?view=rev&rev=448550
Log:
Fixed the BufferUnderFlowException (DIRSERVER-745)

Modified:
    directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java

Modified: directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java?view=diff&rev=448550&r1=448549&r2=448550
==============================================================================
--- directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
(original)
+++ directory/branches/shared/0.9.5/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
Thu Sep 21 06:41:37 2006
@@ -441,6 +441,11 @@
                 length.incCurrentLength();
                 length.incSize();
                 length.setLength( ( length.getLength() << 8 ) | ( octet & 0x00FF
) );
+                
+                if ( stream.hasRemaining() == false )
+                {
+                    return END;
+                }
             }
 
             container.setState( TLVStateEnum.LENGTH_STATE_END );



Mime
View raw message