Merge branch '0.27-maintenance' into sridharb1_contrib_msvc4_0.27
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,64 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
class FujiTags(metaclass=system_tests.CaseMeta):
|
||||
|
||||
filesAndExpectedOutput = [
|
||||
("FujiTagsDRangeAutoRating1.jpg",
|
||||
"""Exif.Fujifilm.ShadowTone SLong 1 0
|
||||
Exif.Fujifilm.HighlightTone SLong 1 0
|
||||
Exif.Fujifilm.Rating Long 1 1
|
||||
Exif.Fujifilm.DRangePriority Short 1 Auto
|
||||
Exif.Fujifilm.DRangePriorityAuto Short 1 Weak
|
||||
""")
|
||||
,
|
||||
("FujiTagsDRangeWeakRating2.jpg",
|
||||
"""Exif.Fujifilm.ShadowTone SLong 1 0
|
||||
Exif.Fujifilm.HighlightTone SLong 1 0
|
||||
Exif.Fujifilm.Rating Long 1 2
|
||||
Exif.Fujifilm.DRangePriority Short 1 Fixed
|
||||
Exif.Fujifilm.DRangePriorityFixed Short 1 Weak
|
||||
""")
|
||||
,
|
||||
("FujiTagsDRangeStrongRating3.jpg",
|
||||
"""Exif.Fujifilm.ShadowTone SLong 1 0
|
||||
Exif.Fujifilm.HighlightTone SLong 1 0
|
||||
Exif.Fujifilm.Rating Long 1 3
|
||||
Exif.Fujifilm.DRangePriority Short 1 Fixed
|
||||
Exif.Fujifilm.DRangePriorityFixed Short 1 Strong
|
||||
"""),
|
||||
("FujiTagsSTone0HTone0Rating4.jpg",
|
||||
"""Exif.Fujifilm.ShadowTone SLong 1 0
|
||||
Exif.Fujifilm.HighlightTone SLong 1 0
|
||||
Exif.Fujifilm.Rating Long 1 4
|
||||
"""),
|
||||
("FujiTagsSTone1HTone-1Rating5.jpg",
|
||||
"""Exif.Fujifilm.ShadowTone SLong 1 +1
|
||||
Exif.Fujifilm.HighlightTone SLong 1 -1
|
||||
Exif.Fujifilm.Rating Long 1 5
|
||||
"""),
|
||||
("FujiTagsSTone4HTone-2.jpg",
|
||||
"""Exif.Fujifilm.ShadowTone SLong 1 +4
|
||||
Exif.Fujifilm.HighlightTone SLong 1 -2
|
||||
Exif.Fujifilm.Rating Long 1 0
|
||||
"""),
|
||||
("FujiTagsSTone-2HTone4.jpg",
|
||||
"""Exif.Fujifilm.ShadowTone SLong 1 -2
|
||||
Exif.Fujifilm.HighlightTone SLong 1 +4
|
||||
Exif.Fujifilm.Rating Long 1 0
|
||||
""")
|
||||
]
|
||||
|
||||
tags = ["Exif.Fujifilm.ShadowTone",
|
||||
"Exif.Fujifilm.HighlightTone",
|
||||
"Exif.Fujifilm.Rating",
|
||||
"Exif.Fujifilm.DRangePriority",
|
||||
"Exif.Fujifilm.DRangePriorityAuto",
|
||||
"Exif.Fujifilm.DRangePriorityFixed"]
|
||||
|
||||
tagcmd = "$exiv2 -K " + " -K ".join(tags)
|
||||
commands = ["$tagcmd $data_path/" + f for f, _ in filesAndExpectedOutput]
|
||||
stdout = [e for _, e in filesAndExpectedOutput]
|
||||
stderr = [""] * len(filesAndExpectedOutput)
|
||||
retval = [0] * len(filesAndExpectedOutput)
|
@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import system_tests
|
||||
|
||||
class NikonTamronLens_F045_35_F14(metaclass=system_tests.CaseMeta):
|
||||
url = "https://github.com/Exiv2/exiv2/issues/1069"
|
||||
|
||||
filename = "$data_path/Tamron_SP_35mm_f1.4_Di_USD_F045.exv"
|
||||
commands = ["$exiv2 -pa --grep lensid/i $filename"]
|
||||
stderr = [""]
|
||||
stdout = [""
|
||||
"""Exif.NikonLd3.LensIDNumber Byte 1 Tamron SP 35mm f/1.4 Di USD
|
||||
"""
|
||||
]
|
||||
retval = [0]
|
@ -0,0 +1,30 @@
|
||||
import system_tests
|
||||
|
||||
|
||||
class BigTiffImageRecursionStackExhaustion(
|
||||
metaclass=system_tests.CaseMeta):
|
||||
"""
|
||||
Regression test for the bug described in:
|
||||
https://github.com/Exiv2/exiv2/issues/712
|
||||
|
||||
A malicious input file can cause BigTiffImage::printIFD() to
|
||||
recurse arbitrarily deep, causing a crash due to stack exhaustion.
|
||||
|
||||
The bug only existed in the -pR mode, which is now only enabled
|
||||
in debug builds.
|
||||
"""
|
||||
url = "https://github.com/Exiv2/exiv2/issues/790"
|
||||
|
||||
filename = system_tests.path(
|
||||
"$data_path/issue_712_poc.tif"
|
||||
)
|
||||
commands = ["$exiv2 -b -u -k pr $filename"]
|
||||
stdout = ["File name : " + filename + """
|
||||
File size : 3720 Bytes
|
||||
MIME type :
|
||||
Image size : 0 x 0
|
||||
"""
|
||||
]
|
||||
stderr = [filename + """: No Exif data found in the file
|
||||
"""]
|
||||
retval = [253]
|