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

Throw if open file with EXV_ENABLE_FILESYSTEM off (backport #3020) #3021

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 4, 2024

If ImageFactory::createIo() is called with a file path and has been built with EXV_ENABLE_FILESYSTEM off it returns a NULL pointer. ImageFactory::open() then calls io->open() on this pointer, causing a segfault. The documentation of ImageFactory::createIo does not say it can return a NULL pointer. This commit makes it throw an exception instead of returning a NULL pointer.


This is an automatic backport of pull request #3020 done by Mergify.

If ImageFactory::createIo() is called with a file path and has been
built with EXV_ENABLE_FILESYSTEM off it returns a NULL pointer.
ImageFactory::open() then calls io->open() on this pointer, causing a
segfault. The documentation of ImageFactory::createIo does not say it
can return a NULL pointer. This commit makes it throw an exception
instead of returning a NULL pointer.

(cherry picked from commit b0f1c48)
This can be thrown anywhere a file operation is not permitted because
exiv2 has been build with EXV_ENABLE_FILESYSTEM off.

(cherry picked from commit 5fb8c65)
@kmilos kmilos merged commit ee783c9 into main Aug 5, 2024
62 of 63 checks passed
@kmilos kmilos deleted the mergify/bp/main/pr-3020 branch August 5, 2024 08:34
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.

2 participants