summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-03-15 13:11:11 +0000
committerUlrich Drepper <drepper@redhat.com>1999-03-15 13:11:11 +0000
commit983b29ede844ad5c26eb9825817eb8c123c5075a (patch)
treea8fbb972c3470190af18f3d34fa908774f8742d0
parentd1987d2d19cff48a896dce678792c3bc2aa90968 (diff)
Update.
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>.
-rw-r--r--ChangeLog5
-rw-r--r--elf/dl-load.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8df25e3c0d..b083279805 100644
--- 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.
diff --git a/elf/dl-load.c b/elf/dl-load.c
index e24a660035..fa8e15cc0c 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -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");