Project

General

Profile

Bug #752

Crash when writing Exif.Image.Software

Added by Jim Nelson over 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
exif
Target version:
Start date:
21 Jan 2011
Due date:
% Done:

100%

Estimated time:

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

img_1330.jpg (4.8 MB) img_1330.jpg Jim Nelson, 21 Jan 2011 15:02
bug752-exiv2-0.20.patch (6.16 KB) bug752-exiv2-0.20.patch Patch for 0.20 (binary compatible) Andreas Huggel, 31 Jan 2011 19:32

Associated revisions

Revision 2435 (diff)
Added by Andreas Huggel over 8 years ago

#752: Do not decode duplicate binary array tags.

Revision 2441 (diff)
Added by Andreas Huggel over 8 years ago

[0.21.1] Merged fix for #752 from the trunk (c2435).

History

#1

Updated by Andreas Huggel over 8 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.

#2

Updated by Andreas Huggel over 8 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.

#3

Updated by Andreas Huggel over 8 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
#4

Updated by Andreas Huggel over 8 years ago

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.

#5

Updated by Andreas Huggel over 8 years ago

  • Target version changed from 0.22 to 0.21.1
#6

Updated by Andreas Huggel about 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF