directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r168194 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/Asn1Decoder.java
Date Wed, 04 May 2005 21:16:42 GMT
Author: elecharny
Date: Wed May  4 14:16:42 2005
New Revision: 168194

URL: http://svn.apache.org/viewcvs?rev=168194&view=rev
Log:
Fixed a bug on the Length computing, if one of the byte was above 0x7F

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/Asn1Decoder.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/Asn1Decoder.java?rev=168194&r1=168193&r2=168194&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/Asn1Decoder.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ber/Asn1Decoder.java Wed
May  4 14:16:42 2005
@@ -390,7 +390,7 @@
 
                 length.incCurrentLength();
                 length.incSize();
-                length.setLength( ( length.getLength() << 8 ) | octet );
+                length.setLength( ( length.getLength() << 8 ) | (octet & 0x00FF));
             }
 
             container.setState( TLVStateEnum.LENGTH_STATE_END );



Mime
View raw message