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

slapadd segfaults with sub,approx indexing on UTF-8 data (ITS#1215)



Full_Name: Kartik Subbarao
Version: CVS - devel
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (65.2.40.171)


I have the following indexing configured in slapd.conf:

index cn pres,eq,sub,approx
index givenName pres,eq,sub,approx

When I use slapadd to add entries with UTF-8 characters in them, slapadd
segfaults. Here is an example LDIF file:

dn: o=test.com
objectclass: top
objectclass: organization
o: test.com

dn: uid=juergen_test@test.com, o=test.com
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
cn:: SsO8cmdlbiBUZXN0
sn: Test
givenname:: SsO8cmdlbg==
uid: juergen_test@test.com 

Here's a backtrace from gdb when running slapadd on this file, at the point of
failure:

#0  ber_bvfree (bv=0x1cb9) at memory.c:368
#1  0x0808d210 in ber_bvecfree (bv=0x80de320) at memory.c:390
#2  0x08070526 in indexer (be=0x80ccf48, dbname=0x80b4478 "givenName", 
    atname=0x80b4478 "givenName", vals=0x80dd708, id=2, op=1, mask=1822)
    at index.c:221
#3  0x080705d9 in index_at_values (be=0x80ccf48, type=0x80b48f8, lang=0x0, 
    vals=0x80dd708, id=2, op=1, dbnamep=0xbffff2a0, maskp=0xbffff2a4)
    at index.c:261
#4  0x080706c1 in index_values (be=0x80ccf48, desc=0x80dd658, vals=0x80dd708, 
    id=2, op=1) at index.c:311
#5  0x0807074f in index_entry (be=0x80ccf48, op=1, e=0x80da218, ap=0x80da380)
    at index.c:342
#6  0x0806736d in ldbm_tool_entry_put (be=0x80ccf48, e=0x80da218)
    at tools.c:194
#7  0x0804af6f in main (argc=4, argv=0xbffff53c) at slapadd.c:112
#8  0x401f8177 in __libc_start_main (main=0x804ad20 <main>, argc=4, 
    ubp_av=0xbffff53c, init=0x804a234 <_init>, fini=0x808e920 <_fini>, 
    rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbffff52c)
    at ../sysdeps/generic/libc-start.c:129