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

Functions does not catch NULL (ITS#1769)



Full_Name: Casper Pedersen
Version: 2.0.23
OS: Linux (Redhat 7.2 - 2.4.18)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (213.84.44.70)


Even if LDAP* is NULL, the ldap function still tries to contact the LDAP server.
Which result in a assert failure: 
search.c:219 ldap_search: Assertion `( (ld)->ld_options.ldo_valid == 0x2)`
failed

If NULL is passed on to a ldap function this function should reture an error
code, which could be catched by the program.

Something like "if (ld == NULL) return LDAP_xxxx;" should do.

This has only been tested against Novell eDirectory 8.5 and 8.6.2.