fix: update IOtiff.cpp to use public libtiff APIs and standard types#1176
Open
mcoliver wants to merge 3 commits intoAcademySoftwareFoundation:mainfrom
Open
fix: update IOtiff.cpp to use public libtiff APIs and standard types#1176mcoliver wants to merge 3 commits intoAcademySoftwareFoundation:mainfrom
mcoliver wants to merge 3 commits intoAcademySoftwareFoundation:mainfrom
Conversation
- Replace internal <tiffiop.h> with public <tiffio.h> - Use standard <cstdint> types (uint32_t, uint16_t) - Use standard malloc/free instead of libtiff internals - Update tag enumeration and field access to use supported public APIs Signed-off-by: Michael Oliver <mcoliver@gmail.com>
Signed-off-by: Michael Oliver <mcoliver@gmail.com>
Signed-off-by: Michael Oliver <mcoliver@gmail.com>
Contributor
Author
|
I had this as a |
Contributor
Author
|
example tif that will segfault the current main but loads fine with the fix in this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building with private methods should be reserved for very specific cases where a public function is not available. From what I can tell we should be able to use standard malloc and free. This is a) best practice, and b) will allow RV to be built with precompiled binaries of libtiff (for example installed with homebrew where the private headers are not included in the distribution)
This also remedies crashes I was experiencing when pulling in malformed tiffs with unsupported bit depths (eg 10,12,14).