Bug #752
Crash when writing Exif.Image.Software
100%
Description
Using the attached photo, Exiv2 0.20 and 0.21 (and r2429) will crash when writing anything to the Exif.Image.Software field:
$ exiv2 -M"set Exif.Image.Software MyApp" img_1330.jpg
exiv2: tiffcomposite.cpp:1152: virtual uint32_t Exiv2::Internal::TiffDirectory::doWrite(Exiv2::Internal::IoWrapper&, Exiv2::ByteOrder, int32_t, uint32_t, uint32_t, uint32_t&): Assertion `sv == d' failed.
Aborted
Files
Associated revisions
[0.21.1] Merged fix for #752 from the trunk (c2435).
History
Updated by Andreas Huggel almost 11 years ago
This is an interesting case. The image has a corrupted Canon makernote with 2 CanonCs composite tags. Exiv2 decodes both (although the data in the second one doesn't make any sense) but when it comes to writing, it tries to pack all CanonCs components back into only one composite tag and somehow gets confused in the process.
Updated by Andreas Huggel almost 11 years ago
- Status changed from New to Resolved
- Assignee set to Andreas Huggel
- Target version set to 0.22
- % Done changed from 0 to 100
The second binary array is no longer decoded now.
Updated by Andreas Huggel almost 11 years ago
$ exiv2 -M"set Exif.Image.Software MyApp" img_1330.jpg Warning: Not decoding duplicate binary array tag 0x0001, group Canon, idx 28 Warning: Not decoding duplicate binary array tag 0x0001, group Canon, idx 28 $ exiv2 -g Exif.Image.Software -pa img_1330.jpg Warning: Not decoding duplicate binary array tag 0x0001, group Canon, idx 28 Exif.Image.Software Ascii 6 MyApp
Updated by Andreas Huggel almost 11 years ago
- File bug752-exiv2-0.20.patch bug752-exiv2-0.20.patch added
The patch for 0.21 can be downloaded from the repository. The resulting library remains binary compatible with 0.21.
A binary compatible patch for 0.20 is attached too.
#752: Do not decode duplicate binary array tags.