[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: MessageID integer problem



Title: RE: MessageID integer problem

Hi Kurt,

>>So the ID number is 32,768. What I am getting right after message ID 32,767 is :
>>
>>02 <- Tag again
>>03 <- Length is in next three bytes
>>00 <- 0
>>80 <- 128 * 256 = 32,768
>>ff <- 255
>>
>>Thus I calculate 33,023 Which is what I return.
>
>As encoded above?  If not, your encoder is broken.

Yes, I return 02 03 00 80 ff which is a bit according to the 'garbage in-garbage out' principle. But 02 03 00 80 ff is I guess not what the client expects: it halts the client. About the first part of your remark : 02 02 80 00. I just noticed that I mistyped. Sorry. It should have read 02 03 00 80 00. That is I guess OK?

The problem by the way suggests a one way problem in the client in the encoding part whilst the decoder seems to function OK ?

reg

Jeroen

-----Original Message-----
From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.org]
Sent: dinsdag 12 april 2005 12:43
To: Bos, Jeroen
Cc: 'ando@sys-net.it'; 'openldap-software@OpenLDAP.org'
Subject: RE: MessageID integer problem


At 11:52 PM 4/11/2005, Bos, Jeroen wrote:
>The client that gives me the problem is 2.0.27.

I note that 2.0 is historic, as is 2.1.

>What my routine does is quit simple. Let's take the correct working number:
>
>02 <- Tag for integer (Message ID)
>02 <- Length, in this case 2, so the next two bytes are the lenght:
>80 <- 128 * 256 = 32,768
>00 <- 0

Your decoder is off.  The first bit of the value portion
is 1 hence the value is a negative INTEGER.

Note: MessageId should be non-negative, so the above indicates
a broken client.  (If this is a modern version of OpenLDAP,
e.g., 2.2.24, you should report this.)   I note that
most servers, including slapd(8), don't enforce this constraint.

>So the ID number is 32,768. What I am getting right after message ID 32,767 is :
>
>02 <- Tag again
>03 <- Length is in next three bytes
>00 <- 0
>80 <- 128 * 256 = 32,768
>ff <- 255
>
>Thus I calculate 33,023 Which is what I return.

As encoded above?  If not, your encoder is broken.

Kurt