-
Notifications
You must be signed in to change notification settings - Fork 278
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 #1843 from Exiv2/mergify/bp/main/pr-1840
Check that the float is within the range of an int before casting (backport #1840)
- Loading branch information
Showing
3 changed files
with
31 additions
and
12 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
Binary file not shown.
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,17 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors | ||
|
||
class FloatToRationalCastOutOfRange(metaclass=CaseMeta): | ||
""" | ||
Test for the bug described in: | ||
https://github.com/Exiv2/exiv2/issues/1838 | ||
""" | ||
url = "https://github.com/Exiv2/exiv2/issues/1838" | ||
|
||
filename = path("$data_path/issue_1838_poc.crw") | ||
commands = ["$exiv2 $filename"] | ||
stderr = [""] | ||
retval = [0] | ||
|
||
compare_stdout = check_no_ASAN_UBSAN_errors |