From a94b02063a6d0c5826c01e3ec2466587eaa995b3 Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Sun, 25 Sep 2022 22:42:42 +0100 Subject: [PATCH] Regression test for https://github.com/Exiv2/exiv2/issues/2366 --- test/data/issue_2366_poc.mp4 | Bin 0 -> 159 bytes tests/bugfixes/github/test_issue_2366.py | 16 ++++++++++++++++ .../test_regression_allfiles.py | 1 + 3 files changed, 17 insertions(+) create mode 100644 test/data/issue_2366_poc.mp4 create mode 100644 tests/bugfixes/github/test_issue_2366.py diff --git a/test/data/issue_2366_poc.mp4 b/test/data/issue_2366_poc.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..e4df35353f939eeb53c4cc5b7801d0d6c38a7312 GIT binary patch literal 159 vcmZQzV30^FsVpcgQBe5*|GxqZFfcH*ho+Py0_hrs+{A3CIFbsON}AFDNVFTK literal 0 HcmV?d00001 diff --git a/tests/bugfixes/github/test_issue_2366.py b/tests/bugfixes/github/test_issue_2366.py new file mode 100644 index 00000000..e7c26f3b --- /dev/null +++ b/tests/bugfixes/github/test_issue_2366.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from system_tests import CaseMeta, check_no_ASAN_UBSAN_errors + +class issue_2366_QuickTimeVideo_userDataDecoder_buffer_overflow(metaclass=CaseMeta): + url = "https://github.com/Exiv2/exiv2/issues/2366" + filename = "$data_path/issue_2366_poc.mp4" + commands = ["$exiv2 $filename"] + retval = [253] + stderr = ["""$filename: No Exif data found in the file +"""] + stdout = ["""File name : $filename +File size : 159 Bytes +MIME type : video/quicktime +Image size : 0 x 0 +"""] diff --git a/tests/regression_tests/test_regression_allfiles.py b/tests/regression_tests/test_regression_allfiles.py index 85b772f4..c7969fa9 100644 --- a/tests/regression_tests/test_regression_allfiles.py +++ b/tests/regression_tests/test_regression_allfiles.py @@ -60,6 +60,7 @@ def get_valid_files(data_dir): # really need to worry about them here "issue_2340_poc.mp4", "issue_2345_poc.mp4", + "issue_2366_poc.mp4", "2018-01-09-exiv2-crash-001.tiff", "cve_2017_1000126_stack-oob-read.webp", "exiv2-bug1247.jpg",