]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_dl_init_paths): Allocate correct number of entries for rtld_search_dirs[0].
authorUlrich Drepper <drepper@redhat.com>
Sat, 20 Nov 1999 02:26:38 +0000 (02:26 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 20 Nov 1999 02:26:38 +0000 (02:26 +0000)
elf/dl-load.c

index e8bdcc83996c0caf2c83e46fb34c117ba037846c..3c416f9c1065173d693bed5ee00f87003698a0d8 100644 (file)
@@ -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");