From 53a761a8f922253485fe88d7a4ec5895ff03dbdc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Nov 1999 02:26:38 +0000 Subject: [PATCH] (_dl_init_paths): Allocate correct number of entries for rtld_search_dirs[0]. --- elf/dl-load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elf/dl-load.c b/elf/dl-load.c index e8bdcc83996..3c416f9c106 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -536,7 +536,7 @@ _dl_init_paths (const char *llp) / sizeof (struct r_search_path_elem)); rtld_search_dirs[0] = (struct r_search_path_elem *) - malloc ((sizeof (system_dirs) / sizeof (system_dirs[0]) - 1) + malloc ((sizeof (system_dirs) / sizeof (system_dirs[0])) * round_size * sizeof (struct r_search_path_elem)); if (rtld_search_dirs[0] == NULL) _dl_signal_error (ENOMEM, NULL, "cannot create cache for search path"); -- 2.47.3