Skip to content

Commit 723606f

Browse files
fix: fix error in reading library base address
1 parent b9261ff commit 723606f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src/main/cpp/common/maps_util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ bool MapsHelper::ReadLibraryMap() {
6262
}
6363
// 库映射可能是不连续的, 但不会出现交叉
6464
if (found_inode != inode_ && inode_ != 0) {
65-
// 严格判断库是否正确, 一个库至少有读写执行内存段
66-
if ((protect & (kMPRead | kMPWrite | kMPExecute)) != (kMPRead | kMPWrite | kMPExecute)) {
65+
// 严格判断库是否正确, 一个库至少有读执行内存段
66+
if ((protect & (kMPRead | kMPExecute)) == (kMPRead | kMPExecute)) {
6767
break;
6868
} else {
6969
started = false;

0 commit comments

Comments
 (0)