if (info_ptr >= info_ptr_end): 当 info_ptr 超出了 info_ptr_end,info_ptr 将为空指针。
abbrev = lookup_abbrev (abbrev_number, unit->abbrevs); 如果 abbrev 为 NULL,则会在后续的代码中使用该空指针,导致程序崩溃。
var = (struct varinfo *) bfd_zalloc (abfd, amt); 如果 var 为 NULL,则会在后续的代码中使用该空指针,导致程序崩溃。
func = (struct funcinfo *) bfd_zalloc (abfd, amt); 如果 func 为 NULL,则会在后续的代码中使用该空指针,导致程序崩溃。
info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr, info_ptr_end); 如果 read_attribute 返回空指针,则会在后续的代码中使用该空指针,导致程序崩溃。
if (!find_abstract_instance (unit, info_ptr, &attr, &func->name, &func->is_linkage, &func->file, &func->line)) goto fail; 如果 find_abstract_instance 返回 FALSE,则会跳转到 fail 标签处,而在 fail 标签处会关闭文件并释放资源,此时如果 func 不为 NULL,则会引发错误。
static bfd_boolean scan_unit_for_symbols (struct comp_unit *unit) { bfd *abfd = unit->abfd; bfd_byte *info_ptr = unit->first_child_die_ptr; bfd_byte *info_ptr_end = unit->stash->info_ptr_end; int nesting_level = 0; struct nest_f
本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://sdn.0voice.com/?id=231
下一篇
qemu
发表列表
评论列表
还没有评论,快来说点什么吧~