[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#6233) print_deref assertion if no deref attributes returned
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#6233) print_deref assertion if no deref attributes returned
- From: hyc@symas.com
- Date: Tue, 28 Jul 2009 20:05:30 GMT
- Auto-submitted: auto-generated (OpenLDAP-ITS)
rmeggins@redhat.com wrote:
> Full_Name: Rich Megginson
> Version: 2.4.17+ (current HEAD)
> OS: Fedora
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (76.113.59.19)
>
>
> I am testing the LDAP Dereference feature specified here -
> http://www.openldap.org/devel/cvsweb.cgi/~checkout~/doc/drafts/draft-masarati-ldap-deref-xx.txt
>
> I am getting an assertion in common.c at line 2077:
> 2074: ptr = lutil_strncopy( ptr, dr->derefVal.bv_val, dr->derefVal.bv_len );
> 2075: *ptr++ = '\n';
> 2076: *ptr++ = '\0';
> 2077: assert( ptr<= buf + len );
>
> tool_write_ldif( LDIF_PUT_COMMENT, NULL, buf, ptr - buf);
>
> In my test, ptr is one greater than buf + len. It appears that len does not
> take into consideration the addition of the trailing \0 at line 2076. My test
> is looking for a dereference attribute which does not have any values, so that
> the attrVals in the control response is empty. If there are values to return in
> attrVals, the assertion is not triggered.
>
Ah the ever-popular off-by-one. Should be OK now in HEAD, thanks for the report.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/