pf z, io.unalloc=true: Abort map check loop if the size-0 map is encountered (#13843)

This commit is contained in:
Khairul Azhar Kasmiran 2019-04-21 22:50:23 +08:00 committed by radare
parent ed8c31095c
commit 8a990cfe7a

View File

@ -1191,6 +1191,10 @@ static void r_print_format_nulltermstring(const RPrint* p, int len, int endian,
? p->iob.map_get (p->iob.io, addr)
: p->iob.map_get_paddr (p->iob.io, addr))
&& map->perm & R_PERM_R) {
if (!map->itv.size) {
total_map_left = addr == 0 ? UT64_MAX : UT64_MAX - addr + 1;
break;
}
total_map_left += map->itv.size - (addr - (p->iob.io->va ? map->itv.addr : map->delta));
addr += total_map_left;
}