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

Commits on Aug 4, 2024

  1. Throw if open file with EXV_ENABLE_FILESYSTEM off

    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)
    jim-easterbrook authored and mergify[bot] committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    42b6b8c View commit details
    Browse the repository at this point in the history
  2. Add kerFileAccessDisabled error code

    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)
    jim-easterbrook authored and mergify[bot] committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    2118d60 View commit details
    Browse the repository at this point in the history