make r_io_mwrite check map->flags

This commit is contained in:
condret 2014-10-23 13:16:32 +02:00
parent f6e5b2b35f
commit 532d3c6a63

View File

@ -267,6 +267,8 @@ R_API int r_io_mwrite (RIO *io, int fd, ut64 maddr, ut8 *buf, int len) {
write_bytes -= d;
maddr += d;
}
if (!(map->flags & R_IO_WRITE)) //check if the map allows writing
return write_bytes;
paddr = maddr - map->from + map->delta;
desc = io->desc;
io->desc = r_io_desc_get (io, fd);