ldap_int_thread_pool_wrapper was called with wrong prototype (ITS#1673) ================ Written by Hallvard B. Furuseth and placed into the public domain. This software is not subject to any license of the University of Oslo. ================ ldap_int_thread_pool_wrapper() was defined with an parameter struct ldap_int_thread_pool_s* but called with a void* argument. Since these may have different representations, it can crash. Hallvard B. Furuseth , March 2002. diff -u2 -r libraries/libldap_r/tpool.c~ libraries/libldap_r/tpool.c --- libraries/libldap_r/tpool.c~ Fri Jan 4 21:17:40 2002 +++ libraries/libldap_r/tpool.c Fri Mar 22 13:36:46 2002 @@ -62,5 +62,5 @@ static void *ldap_int_thread_pool_wrapper( - struct ldap_int_thread_pool_s *pool ); + void *pool ); int @@ -131,6 +131,5 @@ ldap_pvt_thread_t thr; - rc = ldap_pvt_thread_create( &thr, 1, - (void *) ldap_int_thread_pool_wrapper, pool ); + rc = ldap_pvt_thread_create( &thr, 1, ldap_int_thread_pool_wrapper, pool ); if( rc != 0) { @@ -209,5 +208,5 @@ if (need_thread) { int rc = ldap_pvt_thread_create( &thr, 1, - (void *)ldap_int_thread_pool_wrapper, pool ); + ldap_int_thread_pool_wrapper, pool ); ldap_pvt_thread_mutex_lock(&pool->ltp_mutex); if (rc == 0) { @@ -354,6 +353,7 @@ static void * ldap_int_thread_pool_wrapper ( - struct ldap_int_thread_pool_s *pool ) + void *xpool ) { + struct ldap_int_thread_pool_s *pool = xpool; ldap_int_thread_ctx_t *ctx;