Merge "vtable-dumper: Add loganchien to OWNERS"
diff --git a/vndk/tools/vtable-dumper/elf_handling.cpp b/vndk/tools/vtable-dumper/elf_handling.cpp
index e0483db..4e09a88 100644
--- a/vndk/tools/vtable-dumper/elf_handling.cpp
+++ b/vndk/tools/vtable-dumper/elf_handling.cpp
@@ -226,7 +226,7 @@
if (It != mVTables.begin() && It->getStartAddr() != RelOffset) {
It--;
}
- if (It->getEndAddr() >= RelOffset) {
+ if (It->getStartAddr() <= RelOffset && It->getEndAddr() > RelOffset) {
return &(*It);
}
return nullptr;
@@ -341,7 +341,7 @@
for (const SectionRef &Section : mProgBitSectionRefs) {
uint64_t Begin = Section.getAddress();
uint64_t End = Section.getAddress() + Section.getSize();
- if (ROffset >= Begin && ROffset <= End) {
+ if (ROffset >= Begin && ROffset < End) {
return getAddendFromSection(Section, ROffset - Begin);
}
}