-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1882 from kevinbackhouse/FixIssue1881
Throw an error if the size of the preview is greater than 1MB
- Loading branch information
Showing
4 changed files
with
25 additions
and
0 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,22 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from system_tests import CaseMeta, CopyTmpFiles, path | ||
@CopyTmpFiles("$data_path/issue_1881_poc.jpg", "$data_path/issue_1881_coverage.jpg") | ||
|
||
class SonyPreviewImageLargeAllocation(metaclass=CaseMeta): | ||
""" | ||
Regression test for the bug described in: | ||
https://github.com/Exiv2/exiv2/issues/1881 | ||
""" | ||
url = "https://github.com/Exiv2/exiv2/issues/1881" | ||
|
||
filename1 = path("$tmp_path/issue_1881_poc.jpg") | ||
filename2 = path("$tmp_path/issue_1881_coverage.jpg") | ||
commands = ["$exiv2 -q -d I rm $filename1", "$exiv2 -q -d I rm $filename2"] | ||
stdout = ["",""] | ||
stderr = [ | ||
"""Exiv2 exception in erase action for file $filename1: | ||
$kerCorruptedMetadata | ||
""", | ||
""] | ||
retval = [1,0] |