From: Gary V. Vaughan Date: Fri, 29 Jun 2001 01:00:17 +0000 (+0000) Subject: From Alexander Bluhm X-Git-Tag: release-1-4b~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a49cbac3efb2012e3179bc21a71afd7f0442558;p=thirdparty%2Flibtool.git From Alexander Bluhm * libltdl/ltdl.c (lt_dlopen): Fix bad memory initialisation assumptions. --- diff --git a/ChangeLog b/ChangeLog index 9f0488c00..0f58cb7e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-06-28 Gary V. Vaughan + From Alexander Bluhm + * libltdl/ltdl.c (lt_dlopen): Fix bad memory initialisation + assumptions. + * libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE) [HPUX]: Define lt_cv_sys_global_symbol_to_c_name_address to be a sed expression for mangling the output of the symbol pipe into a brace delimited diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 4a94ebc8f..cae492cd7 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1179,6 +1179,7 @@ presym_add_symlist (preloaded) tmp = LT_DLMALLOC (lt_dlsymlists_t, 1); if (tmp) { + memset (tmp, 0, 1*sizeof(lt_dlsymlists_t)); tmp->syms = preloaded; tmp->next = preloaded_symbols; preloaded_symbols = tmp; @@ -2132,10 +2133,7 @@ lt_dlopen (filename) return 0; } - handle->info.ref_count = 0; - handle->depcount = 0; - handle->deplibs = 0; - handle->caller_data = 0; + memset (handle, 0, 1*sizeof(struct lt_dlhandle_struct)); newhandle = handle; /* lt_dlclose()ing yourself is very bad! Disallow it. */ @@ -2373,7 +2371,7 @@ lt_dlopen (filename) goto cleanup; } - handle->info.ref_count = 0; + memset (handle, 0, 1*sizeof(struct lt_dlhandle_struct)); if (load_deplibs (handle, deplibs) == 0) { newhandle = handle;