Commit 28fa8ba
committed
fix(scanner): correct offset semantics docs and harden find_pattern
- Hoist empty/all-wildcard validation out of internal primitive so
warnings log once per public call, not per region or per occurrence.
- Use unsigned modular arithmetic in resolve_rip_relative to avoid
signed pointer overflow UB.
- Correct docs/misc/aob-signatures.md: find_pattern applies
pattern.offset internally; remove misleading manual-add guidance.
- Add regression tests for offset-at-end, all-wildcard Nth occurrence,
zero/empty/null guards, and RIP-relative wraparound contract.1 parent cbaf38b commit 28fa8ba
6 files changed
Lines changed: 1226 additions & 138 deletions
File tree
- docs/misc
- include/DetourModKit
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
865 | 866 | | |
866 | 867 | | |
867 | 868 | | |
| 869 | + | |
868 | 870 | | |
869 | 871 | | |
870 | 872 | | |
| |||
0 commit comments