Skip to content

Commit

Permalink
Use rz_pvector_foreach_cpp for bf->o->sections (#339)
Browse files Browse the repository at this point in the history
kazarmy authored Jan 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 3741188 commit 3fb97d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/RizinLoadImage.cpp
Original file line number Diff line number Diff line change
@@ -44,12 +44,13 @@ void RizinLoadImage::getReadonly(RangeList &list) const
rz_pvector_foreach_cpp<RzBinFile>(&info->cf->binfiles, [&](RzBinFile *bf) {
if(!bf->o || !bf->o->sections)
return true;
rz_list_foreach_cpp<RzBinSection>(bf->o->sections, [&](RzBinSection *sec) {
rz_pvector_foreach_cpp<RzBinSection>(bf->o->sections, [&](RzBinSection *sec) {
if(!sec->name || !sec->vsize)
return;
return true;
if(strstr(sec->name, "__objc_data") || strstr(sec->name, "__objc_classrefs") || strstr(sec->name, "__objc_msgrefs") ||
strstr(sec->name, "__objc_selrefs") || strstr(sec->name, "__objc_superrefs") || strstr(sec->name, "__objc_protorefs"))
list.insertRange(space, sec->vaddr, sec->vaddr + sec->vsize - 1);
return true;
});
return true;
});

0 comments on commit 3fb97d1

Please sign in to comment.