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

Re: (ITS#5931) back-meta crashes with syncrepl data

ando@sys-net.it wrote:

> This won't probably be as easy as I expected: back-meta does not check, 
> parse or return entry controls.  This needs to be fixed as well.

My fault: back-meta does.  However, something strange is happening:

- in some cases, while looping for attribute values, back-meta 
incorrectly treates entry controls (right after the SearchResultEntry 
message) as yet another attribute name/values set

- in other cases things just go fine

I'm trying to modify the code in order to compute the size of the 
SearchResultEntry portion of the message, but again, in some cases, the 
size is computed incorrectly: the computed length is 4 octets shorter 
than what's actually in the packet.

One issue seems to be related to the fact that when ber_skip_tag() 
checks if the length it's computed fits in the ber by calling 
ber_pvt_ber_remaining(), it doesn't count that earlier calls to 
ber_read() moved the ber_ptr forward.  The original ber_ptr should be saved.

I don't believe messages are encoded incorrectly, so I must be doing 
something wrong in decoding them...


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it