Fix seg fault when using `iconv_open()` (#2403)
* Fix seg fault when using `iconv_open()` - Fix failure condition for `iconv_open()` - Add new exception when failing to change the text encoding of an Exif comment * Add testing for `iconv_open()` seg fault bug * Fix Python test by changing log levelmain
parent
dc5dc0d2e3
commit
1f364be1fa
Binary file not shown.
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from system_tests import CaseMeta, CopyTmpFiles, check_no_ASAN_UBSAN_errors
|
||||
@CopyTmpFiles("$data_path/issue_2403_poc.exv")
|
||||
|
||||
class checkIconvSegFault(metaclass=CaseMeta):
|
||||
url = """"""
|
||||
description = """Test the fixcom action in the exiv2 app"""
|
||||
|
||||
filename = """$tmp_path/issue_2403_poc.exv"""
|
||||
|
||||
commands = ["""$exiv2 --verbose --log e --encode made_up_encoding fixcom $filename""",
|
||||
"""$exiv2 --verbose --keep --encode UCS-2LE fixcom $filename"""]
|
||||
retval = [1,0]
|
||||
|
||||
stdout = ["""File 1/1: $filename
|
||||
""",
|
||||
"""File 1/1: $filename
|
||||
Setting Exif UNICODE user comment to "Test"
|
||||
"""]
|
||||
|
||||
stderr = ["""Exiv2 exception in fixcom action for file $filename:
|
||||
Cannot convert text encoding from 'made_up_encoding' to 'UTF-8'
|
||||
""",
|
||||
""""""]
|
Loading…
Reference in New Issue