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

RE: slapadd segfaults (ITS#2587)



Thanks, this is now fixed in RE21 and HEAD.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support 

> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of 
> pturgyan@umich.edu
> Sent: Friday, June 13, 2003 7:50 AM
> To: openldap-its@OpenLDAP.org
> Subject: slapadd segfaults (ITS#2587)
> 
> 
> 
> Using ElectricFence,  I saw that the clean up code in
> caseIgnoreIA5SubstringsIndexer at line 3254 in schema_init.c
> was freeing data that was already freed. In this case an error
> was detected by telephoneNumberNormalize (schema_init.c:1789)
> and it had freed the normalized berval,  but it returned the 
> address of the normalized berval along w/ the error 
> LDAP_INVALID_SYNTAX 
> to the caller caseIgnoreIA5SubstringsIndexer.  I changed the 
> normalizer to not return the normalized berval address.
> 
> 
> Here's my patch against Openldap-2.1.21
> 
> 
> *** schema_init.c.orig  Wed May  7 18:13:39 2003
> --- schema_init.c       Fri Jun 13 10:31:21 2003
> ***************
> *** 1810,1815 ****
> --- 1810,1816 ----
>   
>         if( normalized->bv_len == 0 ) {
>                 free( normalized->bv_val );
> +               normalized->bv_val = NULL;
>                 return LDAP_INVALID_SYNTAX;
>         }
> 
> 
>