Project

General

Profile

Bug #1220

Bug in exiv2 --comment on trunk

Added by Robin Mills about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
jpeg parser
Target version:
Start date:
01 Sep 2016
Due date:
% Done:

100%

Estimated time:
6.00 h

Description

$1136 rmills@rmillsmbp:~/gnu/exiv2/trunk $ cp test/data/Reagan.jpg  .
1137 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 --comment 'hello world' Reagan.jpg 
1138 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 --comment 'hello world' Reagan.jpg 
1139 rmills@rmillsmbp:~/gnu/exiv2/trunk $ exiv2 --comment 'hello world' Reagan.jpg 
Warning: JPEG format error, rc = 5
Exiv2 exception in modify action for file Reagan.jpg:
Input data does not contain a valid image
1140 rmills@rmillsmbp:~/gnu/exiv2/trunk $ 
I believe this has been introduced by the modification to src/jpgimage.cpp/doWriteMetadata() to handle ICC profiles. I haven't totally understood the variable comPos which determined the chunk index at which to write the comment. The comment is being written to output at the wrong time and thereby corruption the chain of chunks.

Remarkably, this isn't being detected by the test suite. When I fix it, I'll add a regression detector to test/icc-test.sh.

Associated revisions

Revision 4461 (diff)
Added by Robin Mills about 5 years ago

#1220 and #1074 Work in progress. Improved -pS for JPEG. #1220 is due to a bug in writing the ICC profile in jpgimage.cpp/doWriteMetadata()

History

#1

Updated by Robin Mills about 5 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 20 to 100
  • Estimated time changed from 3.00 h to 6.00 h

Fixes submitted: r4461 and r4462

Also available in: Atom PDF