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

Avoid seeking on bad file descriptors #1938

Merged
merged 3 commits into from
Dec 22, 2020

Conversation

kleisauke
Copy link
Member

See lovell/sharp#2494 for context.

libvips/iofuncs/source.c Outdated Show resolved Hide resolved
Since subclasses could override the seek method without setting the file descriptor.
@jcupitt jcupitt merged commit 782c0b2 into libvips:8.10 Dec 22, 2020
@jcupitt
Copy link
Member

jcupitt commented Dec 22, 2020

Great! Funny how easy it is to miss stuff like this.

@kleisauke kleisauke deleted the ensure-memory-source branch December 22, 2020 12:54
jcupitt added a commit that referenced this pull request Dec 22, 2020
@kleisauke
Copy link
Member Author

Indeed, I wonder if this would ever be discovered if it didn't cause a runtime error.

For further readers; note that the severity of this issue is low, as the invalid parameter error only seems to happen on Windows when linking against UCRT, which our Windows 32- and 64-bit binaries does not link against.

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.

None yet

2 participants