From: Ulrich Drepper Date: Sat, 20 Nov 1999 02:26:38 +0000 (+0000) Subject: (_dl_init_paths): Allocate correct number of entries for rtld_search_dirs[0]. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53a761a8f922253485fe88d7a4ec5895ff03dbdc;p=thirdparty%2Fglibc.git (_dl_init_paths): Allocate correct number of entries for rtld_search_dirs[0]. --- 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");