From 983b29ede844ad5c26eb9825817eb8c123c5075a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 15 Mar 1999 13:11:11 +0000 Subject: Update. 1999-03-15 Ulrich Drepper * elf/dl-load.c: Compute rtld_search_dir array size correctly. Reported by Yasushi Saito . --- elf/dl-load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'elf/dl-load.c') 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"); -- cgit v1.2.3