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

(ITS#4908) bug ldapsearch.c

Full_Name: Guillaume BUWALDA
Version: 2.2.3
OS: Linux ubuntu
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (

Hello, I do not know where I can send this message, so I send it to you...
I found a little error in the source file client/tools/ldapsearch.c .
gdb give me this bt:

[Cacher les citations]
Program received signal SIGSEGV, Segmentation fault.
> 0xb7eb3c53 in strlen () from /lib/tls/i686/cmov/libc.so.6  (gdb) bt
> #0  0xb7eb3c53 in strlen () from /lib/tls/i686/cmov/libc.so.6
> #1  0xb7e40031 in ber_put_string () from /usr/lib/liblber.so.2
> #2  0xb7e40321 in ber_printf () from /usr/lib/liblber.so.2
> #3  0xb7f8a376 in ldap_build_search_req () from /usr/lib/libldap_r.so.2
> #4  0xb7f8a7fe in ldap_search_ext () from /usr/lib/libldap_r.so.2
when it calls the function ldap_search_ext().
I think the error comes from then "attrs" parameters of this function. At line
611 of the file:
> if ( argv[optind] != NULL ) {                                                 
>    attrs = &argv[optind];   
> }
You may put the last element of the array at NULL. I did this and it work. I
hope this message will help you, and I'm sorry for my very bad english... lol

Good Luck
Guillaume BUWALDA