directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r492229 - /directory/trunks/shared/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
Date Wed, 03 Jan 2007 17:35:15 GMT
Author: elecharny
Date: Wed Jan  3 09:35:14 2007
New Revision: 492229

URL: http://svn.apache.org/viewvc?view=rev&rev=492229
Log:
Fixed a nasty bug when length was in long form but with a 0 value : the PDU was considered
as not finished, even if this was the last PDU,
the decoder was let in a pending state.

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

Modified: directory/trunks/shared/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java?view=diff&rev=492229&r1=492228&r2=492229
==============================================================================
--- directory/trunks/shared/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
(original)
+++ directory/trunks/shared/asn1/src/main/java/org/apache/directory/shared/asn1/ber/Asn1Decoder.java
Wed Jan  3 09:35:14 2007
@@ -297,13 +297,13 @@
                     if ( tlv.getLengthBytesRead() < tlv.getLengthNbBytes() )
                     {
                         container.setState( TLVStateEnum.LENGTH_STATE_PENDING );
+                        return END;
                     }
                     else
                     {
                         container.setState( TLVStateEnum.LENGTH_STATE_END );
+                        return MORE;
                     }
-                    
-                    return END;
                 }
             }
 



Mime
View raw message