mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-14 15:20:04 +00:00
(_dl_init_paths): Add one more element to aelem to not write beyond allocated
memory.
This commit is contained in:
parent
ca754c997a
commit
45dea6bc6f
@ -513,7 +513,7 @@ _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 ((sizeof (system_dirs_len) / sizeof (system_dirs_len[0]))
|
||||
malloc ((sizeof (system_dirs_len) / sizeof (system_dirs_len[0]) + 1)
|
||||
* sizeof (struct r_search_path_elem *));
|
||||
if (rtld_search_dirs == NULL)
|
||||
_dl_signal_error (ENOMEM, NULL, "cannot create search path array");
|
||||
|
Loading…
Reference in New Issue
Block a user