From 3aa76cc58e5a1f3b66c5537b6637931fd293bb2b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 7 Nov 2018 22:13:36 +0100 Subject: Prove that the previous commit is working --- Binary_data_in_Exif_Comment.jpg | Bin 0 -> 1929 bytes tests/test_climat2.py | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 Binary_data_in_Exif_Comment.jpg diff --git a/Binary_data_in_Exif_Comment.jpg b/Binary_data_in_Exif_Comment.jpg new file mode 100644 index 0000000..4716a46 Binary files /dev/null and b/Binary_data_in_Exif_Comment.jpg differ diff --git a/tests/test_climat2.py b/tests/test_climat2.py index 53e4f5b..e17da86 100644 --- a/tests/test_climat2.py +++ b/tests/test_climat2.py @@ -174,3 +174,10 @@ class TestGetMeta(unittest.TestCase): self.assertIn(b'genre: Python', stdout) self.assertIn(b'i am a : various comment', stdout) self.assertIn(b'artist: jvoisin', stdout) + +class TestControlCharInjection(unittest.TestCase): + def test_jpg(self): + proc = subprocess.Popen(mat2_binary + ['--show', './tests/data/control_chars.jpg'], + stdout=subprocess.PIPE) + stdout, _ = proc.communicate() + self.assertIn(b'Comment: GQ\n', stdout) -- cgit v1.3