forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(oiiotool):
-i:ch=...
didn't fix up alpha and z channels (Academ…
…ySoftwareFoundation#4373) Fix a bug in oiiotool wherein `-i:ch=...` (input only a subset of channels when reading from a file) was not adjusting the spec's alpha_channel and z_channel -- that is, they still contained the OLD channel numbers of those things, which not only could be wrong due to the reordering, but they might be out of range of the new number of channels. Also a related fix in the TIFF reader, to fix a possible dereference of an empty vector. This was being triggered by that out-of-range alpha_channel. Maybe that can't happen anymore with the above bug fix, but it still feels like the safer way to proceed. This was all found by the sanitizers in CI -- and only recently, despite this code having this bug for a long time. So yay for sanitizer CI! Signed-off-by: Larry Gritz <lg@larrygritz.com>
- Loading branch information
Showing
3 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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