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

Re: dnNormalize2 failed assertion (sasl_regexp?)



At 07:51 AM 2/6/2003, Stephen Frost wrote:
>738     in getdn.c
>(gdb) p *bv
>$3 = {bv_len = 48, bv_val = 0x81418cf "uid=sfrost/ldap,cn=SNOWMAN.NET,cn=gssapi,cn=auth\b"}
>(gdb) p strlen(bv->bv_val)
>$4 = 49
>
>No clue where the \b is coming from.

Character strings are expected to be NUL ('\0') terminated
in OpenLDAP.  When passed in a berval, bv_len should be equal
to strlen(bv_val).

>Ok, so, I contend that the assert that's there is just plain wrong.

As Ando noted, the statement is quite proper.

>The length is being passed around, who cares what strlen says?

The statement is asserting "Is the berval parameter properly formed?".
The bug is in the function which constructed (or mangled) the berval.

Kurt