From 67d8894ecc0d63d7b1cec97c736d24a02cdf308f Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sat, 13 Jan 2024 15:35:33 +0800 Subject: [PATCH] Use `rz_pvector_foreach_cpp` for `bf->o->sections` --- src/RizinLoadImage.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/RizinLoadImage.cpp b/src/RizinLoadImage.cpp index cb9535a1..5186744b 100644 --- a/src/RizinLoadImage.cpp +++ b/src/RizinLoadImage.cpp @@ -44,12 +44,13 @@ void RizinLoadImage::getReadonly(RangeList &list) const rz_pvector_foreach_cpp(&info->cf->binfiles, [&](RzBinFile *bf) { if(!bf->o || !bf->o->sections) return true; - rz_list_foreach_cpp(bf->o->sections, [&](RzBinSection *sec) { + rz_pvector_foreach_cpp(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; });