Skip to content

Commit 95cdbf5

Browse files
radaretrufae
authored andcommitted
Honor keyword-alignment restrictions ##search
1 parent 1bb5b45 commit 95cdbf5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libr/search/search.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ R_IPI int r_search_hit_sz(RSearch *s, RSearchKeyword *kw, ut64 addr, ut32 sz) {
124124
R_LOG_DEBUG ("0x%08"PFMT64x" unaligned", addr);
125125
return 1;
126126
}
127+
if (kw->align && (addr % kw->align)) {
128+
R_LOG_DEBUG ("0x%08"PFMT64x" unaligned", addr);
129+
return 1;
130+
}
127131
if (!s->contiguous) {
128132
if (kw->last && addr == kw->last) {
129133
kw->count--;

0 commit comments

Comments
 (0)