提交 7886985e 编写于 作者: R Rich Felker

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.
上级 a938b5a1
......@@ -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];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册