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

IOProxy read/write error handling improvements #3712

Merged
merged 1 commit into from
Dec 18, 2022

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Dec 17, 2022

IOMemReader::pread catch out-of-range read positions.

Fixes #3711

Along the way, I noticed that the system pread & pwrite return a ssize_t rather than a size_t as our IOProxy methods do, so I need to catch the negative value returns that they use to indicate errors.

IOMemReader::pread catch out-of-range read positions.

Fixes AcademySoftwareFoundation#3711

Along the way, I noticed that the system pread & pwrite return a
ssize_t rather than a size_t as our IOProxy methods do, so I need to
catch the negative value returns that they use to indicate errors.
@GreyHak
Copy link

GreyHak commented Dec 18, 2022

Thank you @lgritz

@lgritz lgritz merged commit 82a4b08 into AcademySoftwareFoundation:master Dec 18, 2022
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Dec 18, 2022
…tion#3712)

IOMemReader::pread catch out-of-range read positions.

Fixes AcademySoftwareFoundation#3711

Along the way, I noticed that the system pread & pwrite return a
ssize_t rather than a size_t as our IOProxy methods do, so I need to
catch the negative value returns that they use to indicate errors.
@lgritz lgritz deleted the lg-ioproxy branch December 18, 2022 19:57
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.

[BUG] Segfault Due to Logic Error; read negative size
2 participants