Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thdat: fix wrong thtk_io_map() usage in th02_read() and th02_write() #119

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FOTMarut
Copy link

@FOTMarut FOTMarut commented May 12, 2024

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 th02_read()
performs 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.
@FOTMarut FOTMarut marked this pull request as draft May 12, 2024 18:44
@FOTMarut FOTMarut marked this pull request as ready for review May 12, 2024 19:22
@FOTMarut FOTMarut changed the title thdat: fix wrong thtk_io_map() usage in th02_read() thdat: fix wrong thtk_io_map() usage in th02_read() and th02_write() May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant