diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-06-18 22:42:23 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-06-18 22:42:23 +0000 |
commit | 557e404d6595bed6be66076577b829a00f39eda4 (patch) | |
tree | 361c700610de267c069899ca3ccec93920752503 /ldso/ldso/dl-hash.c | |
parent | 20d8808116d749b626c080b2891c968f163966e6 (diff) |
Be extra careful to memset the correct size, not the size of some random
pointer. Fix printing of '0x0x' in ldd output. Simplify discrimination of
libname, so doing things like dlopen("./libfoo.so",RTLD_NOW) with a leading
"./" in the path will work as expected.
-Erik
Diffstat (limited to 'ldso/ldso/dl-hash.c')
-rw-r--r-- | ldso/ldso/dl-hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c index 6922ba9de..bd7ac7708 100644 --- a/ldso/ldso/dl-hash.c +++ b/ldso/ldso/dl-hash.c @@ -109,13 +109,13 @@ struct elf_resolve *_dl_add_elf_hash_table(const char *libname, if (!_dl_loaded_modules) { tpnt = _dl_loaded_modules = (struct elf_resolve *) _dl_malloc(sizeof(struct elf_resolve)); - _dl_memset(tpnt, 0, sizeof(*tpnt)); + _dl_memset(tpnt, 0, sizeof(struct elf_resolve)); } else { tpnt = _dl_loaded_modules; while (tpnt->next) tpnt = tpnt->next; tpnt->next = (struct elf_resolve *) _dl_malloc(sizeof(struct elf_resolve)); - _dl_memset(tpnt->next, 0, sizeof(*(tpnt->next))); + _dl_memset(tpnt->next, 0, sizeof(struct elf_resolve)); tpnt->next->prev = tpnt; tpnt = tpnt->next; }; |