Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 15 Mar 1999 13:11:11 +0000 (13:11 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 15 Mar 1999 13:11:11 +0000 (13:11 +0000)
1999-03-15  Ulrich Drepper  <drepper@cygnus.com>

* elf/dl-load.c: Compute rtld_search_dir array size correctly.
Reported by Yasushi Saito <yasushi@cs.washington.edu>.

ChangeLog
elf/dl-load.c

index 8df25e3c0dbc064c27a4d495aadc06675d41f981..b083279805f188c636c4eb4cf54f20e8b44aef0a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-03-15  Ulrich Drepper  <drepper@cygnus.com>
+
+       * elf/dl-load.c: Compute rtld_search_dir array size correctly.
+       Reported by Yasushi Saito <yasushi@cs.washington.edu>.
+
 1999-03-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
 
        * manual/libc.texinfo: Undo last change for now.
index e24a66003540cc46af12577adf919264883da82b..fa8e15cc0cda0911d80289d9898c433b72b36024 100644 (file)
@@ -481,7 +481,8 @@ _dl_init_paths (const char *llp)
 
   /* First set up the rest of the default search directory entries.  */
   aelem = rtld_search_dirs = (struct r_search_path_elem **)
-    malloc ((ncapstr + 1) * sizeof (struct r_search_path_elem *));
+    malloc (((sizeof (system_dirs) / sizeof (system_dirs[0]) + 1)
+            * sizeof (struct r_search_path_elem *));
   if (rtld_search_dirs == NULL)
     _dl_signal_error (ENOMEM, NULL, "cannot create search path array");