directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jérôme Baumgarten (JIRA) <>
Subject [jira] Commented: (DIRSNICKERS-108) Wrong int encoding in Value
Date Fri, 23 Sep 2005 08:25:27 GMT
    [ ]

Jérôme Baumgarten commented on DIRSNICKERS-108:

Actually the patch I sent corrects the issue for positive values, I tried it and it does the
job for values over 128. I checked it with my LDAP proxy (my running test proxy has served
so far 544 messages to the same client / same connection).

I actually tracked that bug down by adding traces to the LdapMessageGrammar class (incoming
int values are correctly decoded and 128 is coded as "0x00 0x80" as expected) but the decoding
was incorrectly dealing with high bit set to 1, "0x80" was sent back, a value that the clients
decode as -128 making it still waiting to the answer to message +128.


> Wrong int encoding in Value
> ---------------------------
>          Key: DIRSNICKERS-108
>          URL:
>      Project: Directory ASN1
>         Type: Bug
>   Components: BER Runtime
>     Reporter: Jérôme Baumgarten
>     Assignee: Emmanuel Lecharny
>     Priority: Blocker
>  Attachments: Value.patch
> Hi,
> Encoding is buggy for int value in the org.apache.asn1new.ber.tlv.Value class. The affected
methods are :
> * public static int getNbBytes( int value )
> * public static byte[] getBytes( int value )
> Regards,
> Jérôme

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message