diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-10-04 00:29:58 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-10-04 00:29:58 -0400 |
commit | 7886985e1390a64a97c63d9ff182a6483dd107cc (patch) | |
tree | 06d5507b04fc0a60a80fec8940c627c530a1b2a7 | |
parent | a938b5a12d7a68d45f4549bca670d8941304e750 (diff) | |
download | musl-7886985e1390a64a97c63d9ff182a6483dd107cc.tar.gz musl-7886985e1390a64a97c63d9ff182a6483dd107cc.tar.xz musl-7886985e1390a64a97c63d9ff182a6483dd107cc.zip |
fix uninitialized variable in dladdr
the affected branch only applies for DSOs that lack standard hash table and only have the GNU hash table present.
-rw-r--r-- | src/ldso/dynlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index a525b3d8..fc588320 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c @@ -1354,7 +1354,7 @@ int __dladdr(void *addr, Dl_info *info) uint32_t *hashval; buckets = p->ghashtab + 4 + (p->ghashtab[2]*sizeof(size_t)/4); sym += p->ghashtab[1]; - for (i = 0; i < p->ghashtab[0]; i++) { + for (i = nsym = 0; i < p->ghashtab[0]; i++) { if (buckets[i] > nsym) nsym = buckets[i]; } |