| 127 | } |
| 128 | |
| 129 | void *dylib::find_memory(const void *rladdr, const char *pattern) |
| 130 | { |
| 131 | bool wildcard; |
| 132 | auto patern_bytes = pattern_to_bytes(pattern, &wildcard); |
| 133 | if (!patern_bytes.size()) |
| 134 | return nullptr; |
| 135 | |
| 136 | void *base_address = get_base_address(rladdr); |
| 137 | if (!base_address) |
| 138 | return nullptr; |
| 139 | |
| 140 | size_t lib_size = get_lib_size(base_address); |
| 141 | if (!lib_size) |
| 142 | return nullptr; |
| 143 | |
| 144 | if (wildcard) |
| 145 | return scan_memory_pattern(base_address, lib_size, patern_bytes); |
| 146 | else |
| 147 | return scan_memory_bytes(base_address, lib_size, patern_bytes); |
| 148 | } |
nothing calls this directly
no test coverage detected