[Date Prev][Date Next]
no return value in entry_dup() for servers/slapd/entry.c (ITS#2799)
Full_Name: Darin Broady
OS: Irix 6.5.19m & Solaris 8 07/03
Submission from: (NULL) (188.8.131.52)
In <root>/servers/slapd/entry.c, there is a function called entry_dup() that
does not return the ret value allocated. On SGI Irix 6.5.19m with MIPSpro 7.4m
compilers, this causes a crash in any code that then attempts to dereference
this value. On Solaris 8 with the Forte 6 Update 2 compiler, for some reason it
didn't crash and it returned the ret value anyways.
I specifically saw the crash while writing a SLAPI plugin, which called in this
search = slapi_search_internal(...)
slapi_pblock_get(search, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries)
slapi_entry_attr_find(entries, "shadowExpire", &attr)
The call to slapi_entry_attr_find() would cause a SIGBUS error in attr_find()
because the memory address was not correct.
I have checked the CVSWeb and saw that lukeh has committed a change to HEAD that
fixes this issue. I would like to make sure that it gets incorporated into the
OpenLDAP-2.2.2 next release.