Bug #1220

Bug in exiv2 --comment on trunk

Added by Robin Mills 12 months ago. Updated 12 months ago.

Status:ClosedStart date:01 Sep 2016
Priority:NormalDue date:
Assignee:Robin Mills% Done:

100%

Category:jpeg parserEstimated time:6.00 hours
Target version:0.26

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
Added by Robin Mills 12 months 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 12 months ago

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

Fixes submitted: r4461 and r4462

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux