Fix #9883, Handle hit in search left over (#9890)

This commit is contained in:
sivaramaaa 2018-04-15 17:55:27 +05:30 committed by radare
parent ed48dc0940
commit 505bb8fdaf

View File

@ -34,6 +34,10 @@ static RList *keywords;
static int hit(RSearchKeyword *kw, void *user, ut64 addr) {
int delta = addr - cur;
if (cur > addr && (cur - addr == kw->keyword_length - 1)) {
// This case occurs when there is hit in search left over
delta = cur - addr;
}
if (delta < 0 || delta >= bsize) {
eprintf ("Invalid delta\n");
return 0;