about summary refs log tree commit diff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 48c78c32df..3e5ddc04f1 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1136,7 +1136,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
 
       /* Now move the existing entries one back.  */
       memmove (&l->l_scope[1], &l->l_scope[0],
-	       sizeof (l->l_scope) - sizeof (l->l_scope[0]));
+	       (l->l_scope_max - 1) * sizeof (l->l_scope[0]));
 
       /* Now add the new entry.  */
       l->l_scope[0] = &l->l_symbolic_searchlist;