-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TIFF: guard against corrupt files with buffer overflows (#3628)
Along the way, improve the runtest.py script by giving the info_command() fuction the same silent, concat, and failureok parameters that the oiiotool() function has. (This lets individual tests assemble iinfo command lines with a little more flexibility.)
- Loading branch information
Showing
5 changed files
with
32 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Reading src/separate.tif | ||
src/separate.tif : 128 x 128, 3 channel, uint8 tiff | ||
SHA-1: 486088DECAE711C444FDCAB009C378F7783AD9C5 | ||
channel list: R, G, B | ||
compression: "zip" | ||
DateTime: "2020:10:25 15:32:04" | ||
Orientation: 1 (normal) | ||
planarconfig: "separate" | ||
Software: "OpenImageIO 2.3.0dev : oiiotool --pattern fill:topleft=0,0,0:topright=1,0,0:bottomleft=0,1,0:bottomright=1,1,1 128x128 3 --planarconfig separate -scanline -attrib tiff:rowsperstrip 17 -d uint8 -o separate.tif" | ||
oiio:BitsPerSample: 8 | ||
tiff:Compression: 8 | ||
tiff:PhotometricInterpretation: 2 | ||
tiff:PlanarConfiguration: 2 | ||
tiff:RowsPerStrip: 7 | ||
Comparing "src/separate.tif" and "separate.tif" | ||
PASS | ||
oiiotool ERROR: read : "src/corrupt1.tif": Could not open file: IO error during reading of "StripOffsets" | ||
Full command line was: | ||
> oiiotool -colorconfig ../common/OpenColorIO/nuke-default/config.ocio --oiioattrib try_all_readers 0 --info -v src/corrupt1.tif | ||
Comparing "check1.tif" and "ref/check1.tif" | ||
PASS |
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
Binary file not shown.