mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-08 03:49:57 +00:00
openldap: fix uninitialized ptr access problem
To be safe, the ldap_pvt_thread_pool_getkey() function should always set the data parameter. If this is not done, slapd can segfault during shutdown. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
openldap: set pointer
|
||||||
|
|
||||||
|
When the function ldap_pvt_thread_pool_getkey() succeeds, it
|
||||||
|
must set the value of *data since the caller may try to use it.
|
||||||
|
|
||||||
|
Upstream-Status: pending
|
||||||
|
|
||||||
|
Signed-off-by: Joe Slater <jslater@windriver.com>
|
||||||
|
|
||||||
|
|
||||||
|
--- a/libraries/libldap_r/thr_stub.c
|
||||||
|
+++ b/libraries/libldap_r/thr_stub.c
|
||||||
|
@@ -217,6 +217,7 @@ ldap_pvt_thread_pool_unidle ( ldap_pvt_t
|
||||||
|
int ldap_pvt_thread_pool_getkey (
|
||||||
|
void *ctx, void *key, void **data, ldap_pvt_thread_pool_keyfree_t **kfree )
|
||||||
|
{
|
||||||
|
+ if (data) *data = NULL; /* avoid problems with uninitialized *data */
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -25,6 +25,7 @@ SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${BP}.tgz \
|
|||||||
file://use-urandom.patch \
|
file://use-urandom.patch \
|
||||||
file://initscript \
|
file://initscript \
|
||||||
file://slapd.service \
|
file://slapd.service \
|
||||||
|
file://thread_stub.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943"
|
SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943"
|
||||||
SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7"
|
SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7"
|
||||||
|
|||||||
Reference in New Issue
Block a user