thtk_io_map() creates a read-only memory mapping, but both th02_read() and th02_write() perform writes to the data buffer. This immediately segfaults (well actually it doesn't, because mmap always fails, but that's another story).
This commit fixes it so thtk_io_pread() is used directly instead.
thtk_io_map() creates a read-only memory mapping, but both th02_read() and th02_write() perform writes to the data buffer. This immediately segfaults (well actually it doesn't, because mmap always fails, but that's another story). This commit fixes it so thtk_io_pread() is used directly instead.