[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ldap_get_values_len(3) array not null terminated
On Mon, 28 Aug 2006 07:38:40 +0200 (CEST)
"Pierangelo Masarati" <ando@sys-net.it> wrote:
> > vals = ldap_get_values_len(ldap, entry, attr);
> > for (vi = 0; vals[vi]; vi++) {
> > struct berval *val = vals[vi];
> > printf("%ld\n", val->bv_len); <======= HERE
> > vi++;
> > }
>
> You appear to increment "vi" twice: once in the for, and once explicitly
> in the cycle. Please check and report.
Yup. Dumb mistake on my part. Values are appropriately NULL terminated.
Thanks,
Mike