diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-05-04 15:47:12 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-05-04 15:47:12 +0000 |
commit | 28760b3d01946b74cad0034b347746092820d31e (patch) | |
tree | 53a97553b96a28257e83fc7560832aff83082863 /elf | |
parent | 68843294160a5419ba20cbe3658de953b73337ce (diff) | |
download | glibc-28760b3d01946b74cad0034b347746092820d31e.zip glibc-28760b3d01946b74cad0034b347746092820d31e.tar.gz glibc-28760b3d01946b74cad0034b347746092820d31e.tar.bz2 |
(dl_open_worker): Use l_map_start and l_map_end to test for pointer in range of DSO address space.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-open.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c index 9467759..76c36cf 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -110,9 +110,14 @@ dl_open_worker (void *a) for (l = _dl_loaded; l; l = l->l_next) if (l->l_addr != 0 /* Make sure we do not currently set this map up in this moment. */ - && caller >= (const void *) l->l_addr - && (call_map == NULL || call_map->l_addr < l->l_addr)) - call_map = l; + && caller >= (const void *) l->l_map_start + && caller < (const void *) l->l_map_end) + { + /* There must be exactly one DSO for the range of the virtual + memory. Otherwise something is really broken. */ + call_map = l; + break; + } if (call_map == NULL) /* In this case we assume this is the main application. */ |