summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/openldap
diff options
context:
space:
mode:
authorJoe Slater <jslater@windriver.com>2015-03-10 10:54:04 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2015-03-21 16:42:22 +0100
commit6abfe21a2aaf5daa9ddca36fcd36c3f65febb230 (patch)
treebeaa83a14cdc5e7ad3b455767f6300bec3499ba7 /meta-oe/recipes-support/openldap
parent0d38b6720795b0eca00dc92b395d92d28e94e609 (diff)
downloadmeta-openembedded-6abfe21a2aaf5daa9ddca36fcd36c3f65febb230.tar.gz
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>
Diffstat (limited to 'meta-oe/recipes-support/openldap')
-rw-r--r--meta-oe/recipes-support/openldap/openldap-2.4.39/thread_stub.patch20
-rw-r--r--meta-oe/recipes-support/openldap/openldap_2.4.39.bb1
2 files changed, 21 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/openldap/openldap-2.4.39/thread_stub.patch b/meta-oe/recipes-support/openldap/openldap-2.4.39/thread_stub.patch
new file mode 100644
index 000000000..540ba4a63
--- /dev/null
+++ b/meta-oe/recipes-support/openldap/openldap-2.4.39/thread_stub.patch
@@ -0,0 +1,20 @@
1openldap: set pointer
2
3When the function ldap_pvt_thread_pool_getkey() succeeds, it
4must set the value of *data since the caller may try to use it.
5
6Upstream-Status: pending
7
8Signed-off-by: Joe Slater <jslater@windriver.com>
9
10
11--- a/libraries/libldap_r/thr_stub.c
12+++ b/libraries/libldap_r/thr_stub.c
13@@ -217,6 +217,7 @@ ldap_pvt_thread_pool_unidle ( ldap_pvt_t
14 int ldap_pvt_thread_pool_getkey (
15 void *ctx, void *key, void **data, ldap_pvt_thread_pool_keyfree_t **kfree )
16 {
17+ if (data) *data = NULL; /* avoid problems with uninitialized *data */
18 return(0);
19 }
20
diff --git a/meta-oe/recipes-support/openldap/openldap_2.4.39.bb b/meta-oe/recipes-support/openldap/openldap_2.4.39.bb
index e2c700f1d..0183d029d 100644
--- a/meta-oe/recipes-support/openldap/openldap_2.4.39.bb
+++ b/meta-oe/recipes-support/openldap/openldap_2.4.39.bb
@@ -25,6 +25,7 @@ SRC_URI = "ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${BP}.tgz \
25 file://use-urandom.patch \ 25 file://use-urandom.patch \
26 file://initscript \ 26 file://initscript \
27 file://slapd.service \ 27 file://slapd.service \
28 file://thread_stub.patch \
28" 29"
29SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943" 30SRC_URI[md5sum] = "b0d5ee4b252c841dec6b332d679cf943"
30SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7" 31SRC_URI[sha256sum] = "8267c87347103fef56b783b24877c0feda1063d3cb85d070e503d076584bf8a7"